Documentation ¶
Index ¶
- func CheckErr(err error)
- func DownloadFile(url string, filepath string) error
- func GetBotUpdatesChan(bot *tgbotapi.BotAPI) (<-chan tgbotapi.Update, error)
- func GetMainKeyboard() tgbotapi.ReplyKeyboardMarkup
- func GetNewBot(token string, debug bool) (*tgbotapi.BotAPI, error)
- func IsCommand(msg *tgbotapi.Message) bool
- func IsDocument(msg *tgbotapi.Message) bool
- func IsFromAdmin(msg *tgbotapi.Message) bool
- func IsPrivate(msg *tgbotapi.Message) bool
- func SendMarkdownMessage(bot *tgbotapi.BotAPI, chatID int, text string) error
- func SendMessage(bot *tgbotapi.BotAPI, chatID int, text string, markdown bool, keyboard bool) error
- func SendTextMessage(bot *tgbotapi.BotAPI, chatID int, text string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile downloads a file and saves it
func GetBotUpdatesChan ¶
func GetBotUpdatesChan(bot *tgbotapi.BotAPI) (<-chan tgbotapi.Update, error)
GetBotUpdatesChan returns updates chan of bot
func GetMainKeyboard ¶
func GetMainKeyboard() tgbotapi.ReplyKeyboardMarkup
GetMainKeyboard returns main bot keyboard
func IsCommand ¶
func IsCommand(msg *tgbotapi.Message) bool
IsCommand returns true if message text starts with /
func IsDocument ¶
func IsDocument(msg *tgbotapi.Message) bool
IsDocument returns true if message is a file
func IsFromAdmin ¶
func IsFromAdmin(msg *tgbotapi.Message) bool
IsFromAdmin returns true if message is from an admin
func IsPrivate ¶
func IsPrivate(msg *tgbotapi.Message) bool
IsPrivate returns true if message is a private message
func SendMarkdownMessage ¶
SendMarkdownMessage sends a markdown message to a chat
func SendMessage ¶
SendMessage sends a message to a chat
func SendTextMessage ¶
SendTextMessage sends a normal text message to a chat
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.