package
Version:
v1.0.13
Opens a new window with list of versions in this module.
Published: Nov 16, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
NewBot creates a new Bot instance with the configuration.
GetAPI returns the bot's API instance.
GetCfg returns the bot's configuration.
SendMessage sends a message using the bot's API.
SetCommands sets the bot commands that will be shown in the UI.
type Config struct {
BotToken string `envconfig:"TELEGRAM_API_TOKEN" required:"true"`
UpdateCfgTimeout int `envconfig:"TELEGRAM_UPDATE_CONFIG_TIMEOUT" default:"60"`
IsDebug bool `envconfig:"TELEGRAM_DEBUG" default:"false"`
}
Config holds the configuration for the Telegram bot.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.