Documentation ¶
Index ¶
Constants ¶
View Source
const ( OPTION_TYPE_STRING = 3 OPTION_TYPE_INT = 4 OPTION_TYPE_BOOL = 5 OPTION_TYPE_USER = 6 OPTION_TYPE_CHANNEL = 7 OPTION_TYPE_ROLE = 8 )
Variables ¶
View Source
var ( Commands = map[string]commandRoute{ "ping": { Name: "ping", Description: "Check the responsiveness of the bot.", CommandFunction: cmdPing, }, "say": { Name: "say", Description: "Make the bot say something!", CommandFunction: cmdSay, Options: []commandOption{ { Type: OPTION_TYPE_STRING, Name: "message", Description: "What you'd like the bot to say.", Required: true, }, }, }, "info": { Name: "info", Description: "About the bot.", CommandFunction: cmdInfo, }, "help": { Name: "help", Description: "See Slashy's commands.", CommandFunction: cmdHelp, }, "maths": { Name: "maths", Description: "Evaluate a maths expression.", CommandFunction: cmdMaths, Options: []commandOption{ { Type: OPTION_TYPE_STRING, Name: "expression", Description: "What you'd like to evaluate.", Required: true, }, }, }, "time": { Name: "time", Description: "Check the time in a location.", CommandFunction: cmdTime, Options: []commandOption{ { Type: OPTION_TYPE_STRING, Name: "location", Description: "Which time zone/location?", Required: true, }, }, }, "currency": { Name: "currency", Description: "Check exchange rates.", CommandFunction: cmdCurrency, Options: []commandOption{ { Type: OPTION_TYPE_STRING, Name: "from", Description: "What currency you're converting from.", Required: true, }, { Type: OPTION_TYPE_STRING, Name: "amount", Description: "The amount of the base currency you're converting.", Required: true, }, { Type: OPTION_TYPE_STRING, Name: "to", Description: "What currency you're converting into.", Required: true, }, }, }, "dictionary": { Name: "dictionary", Description: "Search for words.", CommandFunction: cmdDictionary, Options: []commandOption{ { Type: OPTION_TYPE_STRING, Name: "word", Description: "The word to search.", Required: true, }, }, }, } )
Functions ¶
func InitialiseCommands ¶
func InitialiseCommands()
func Router ¶
func Router(e *interaction.Event) *interaction.EventCallback
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.