package
Version:
v2.0.4+incompatible
Opens a new window with list of versions in this module.
Published: Jan 3, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Bot struct {
Bot *tgbotapi.BotAPI
Config BotConfig
}
Bot telegram interaction client
NewBot creates new telegram bot
func (b *Bot) GetUpdatesChannel() (tgbotapi.UpdatesChannel, error)
GetUpdatesChannel gets new updates updates
SendMessage sends a telegram message
type BotConfig struct {
Token string
Debug bool
UpdatesTimeout int
}
BotConfig configuration of the bot
type Message struct {
ChatID int
MessageID int
Text string
}
Message a telegram message struct
Source Files
¶
Click to show internal directories.
Click to hide internal directories.