Documentation
¶
Index ¶
- Constants
- func CommandBind(bot *telegrambot.Bot, update tgbotapi.Update) error
- func CommandConnect(bot *telegrambot.Bot, update tgbotapi.Update) error
- func CommandNotFound(bot *telegrambot.Bot, update tgbotapi.Update) error
- func CommandStart(bot *telegrambot.Bot, update tgbotapi.Update) error
- func CommandTurn(bot *telegrambot.Bot, update tgbotapi.Update) error
- type BotContext
Constants ¶
View Source
const ( MSG_START_FMT = "Hi %s! This is the Unciv Notification Bot!" MSG_ERR_NOT_FOUND = "Sorry, I couldn't find that command. Please try something else." MSG_ERR_UNEXPECTED_FMT = "An unexpected error has occurred. Please try again later.\n\nError reference: %s" // error reference MSG_ERR_NO_GAME_FOUND = "Did not find any games bound to this chat. Use the /bind command with your game's ID to bind a game to this chat." )
View Source
const ( MSG_TURN_FMT = "It is your turn! (as of %s)" MSG_TURN_REGISTERED_FMT = "[%s](tg://user?id=%d): " + MSG_TURN_FMT MSG_TURN_UNREGISTERED_FMT = "%s: " + MSG_TURN_FMT )
View Source
const ( MSG_ERR_BIND_NO_ARGS = "Syntax: /bind <game ID>" MSG_ERR_CONNECT_NO_ARGS = "Syntax: /register <unciv ID>" )
Variables ¶
This section is empty.
Functions ¶
func CommandBind ¶
func CommandBind(bot *telegrambot.Bot, update tgbotapi.Update) error
func CommandConnect ¶
func CommandConnect(bot *telegrambot.Bot, update tgbotapi.Update) error
func CommandNotFound ¶
func CommandNotFound(bot *telegrambot.Bot, update tgbotapi.Update) error
func CommandStart ¶
func CommandStart(bot *telegrambot.Bot, update tgbotapi.Update) error
func CommandTurn ¶
func CommandTurn(bot *telegrambot.Bot, update tgbotapi.Update) error
Types ¶
type BotContext ¶
BotContext is used to store additional information in the bot object
func GetBotContext ¶
func GetBotContext(bot *telegrambot.Bot) *BotContext
func NewBotContext ¶
func NewBotContext(bot *telegrambot.Bot) *BotContext
func (*BotContext) InitialiseMemoryDB ¶
func (context *BotContext) InitialiseMemoryDB() (err error)
func (*BotContext) InitialiseSQLiteDB ¶
func (context *BotContext) InitialiseSQLiteDB(path string) (err error)
Click to show internal directories.
Click to hide internal directories.