bot

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	*telegram.Bot
	Config Config
	Logger *log.Logger
}

func New

func New(configPath string, logger *log.Logger) (*Bot, error)

type Config

type Config struct {
	Token        string `toml:"token"`
	Webhook      string `toml:"webhook"`
	Addr         string `toml:"addr"`
	Debug        bool   `toml:"debug"`
	DatabasePath string `toml:"database-path"`

	GoogleAPIKey         string `toml:"google-api-key"`
	GoogleSearchEngineID string `toml:"google-search-engine-id"`
	OpenweathermapAppID  string `toml:"openweathermap-app-id"`
	AlphaVantageToken    string `toml:"alphavantage-token"`
}

func Load

func Load(path string) (Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL