Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategoryToString ¶
CategoryToString converts a Category to the string of the name
Types ¶
type Category ¶
type Category int
Category is an enumeration type of the categories
const ( // CategoryInfodagen is the category for Infodagen commands CategoryInfodagen Category = iota // CategoryLinks is the category for link commands CategoryLinks Category = iota // CategoryAlgemeen is the category for general commands CategoryAlgemeen Category = iota // CategoryFun is the category for funny commands CategoryFun Category = iota // CategoryModeratie is the category for moderation commands CategoryModeratie Category = iota // CategoryStudenten is the category for student commands CategoryStudenten Category = iota // CategoryOverige is the category for other commands CategoryOverige Category = iota )
func StringToCategory ¶
StringToCategory gets the Category of string, case insensitive
type Command ¶
type Command struct { Name string Category Category Description string Hidden bool // deprecated Handler func(*discordgo.Session, *discordgo.MessageCreate) }
Command is a struct of a bot command
type Registry ¶
type Registry interface { // if command is "" all messages will be sent RegisterMessageCreateHandler(command string, fn func(*discordgo.Session, *discordgo.MessageCreate)) RegisterMessageEditHandler(command string, fn func(*discordgo.Session, *discordgo.MessageUpdate)) RegisterMessageReactionAddHandler(fn func(*discordgo.Session, *discordgo.MessageReactionAdd)) RegisterGuildMemberAddHandler(fn func(*discordgo.Session, *discordgo.GuildMemberAdd)) }
Registry is the interface of a command registry
Click to show internal directories.
Click to hide internal directories.