Documentation ¶
Index ¶
- Variables
- func HelpCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func HowLongCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func InvalidCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func JoinCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func KickCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func LeaveCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func NonCommandHandler(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func NonTextHandler(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func PingCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
- func SeeQueueCommand(userMessage tgbotapi.Update, bot *tgbotapi.BotAPI) (feedback string)
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailableCommands = []commandtypes.AcceptedCommands{ { Command: "join", Description: "Join the virtual queue for the photobooth.", Handler: JoinCommand, }, { Command: "leave", Description: "Leave the virtual queue for the photobooth.", Handler: LeaveCommand, }, { Command: "seequeue", Description: "(admins only - check this): see the contents of the queue now.", Handler: SeeQueueCommand, }, { Command: "ping", Description: "(admins only - check this): send a reminder to the first person in queue.", Handler: PingCommand, }, { Command: "kick", Description: "(admins only - check this): remove the person at some set position", Handler: KickCommand, }, { Command: "howlong", Description: "Returns the expected time to wait in the queue", Handler: HowLongCommand, }, { Command: "help", Description: "Explains the main functionalities of the bot.", Handler: HelpCommand, }, { Command: "start", Description: "Explains the main functionalities of the bot.", Handler: HelpCommand, }, }
Command and description is hard-coded within the HelpFunction for circular dependencies. You will need to update the help function accordingly if you want to change this definition. If this becomes too troublesome, consider using the reflect package to store the handler function names under a string first before using reflect.ValueOf().Call()
Functions ¶
func HelpCommand ¶
func HowLongCommand ¶
To update: should be variable based on whether you have joined the queue.
func InvalidCommand ¶
func JoinCommand ¶
func KickCommand ¶
func LeaveCommand ¶
func NonCommandHandler ¶
func NonTextHandler ¶
func PingCommand ¶
Indirectly called handlers
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.