Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
func AddCommand(command string, handler CommandHandler)
AddCommand registers a new command for the command handler
Types ¶
type CommandHandler ¶
type CommandHandler = func(discord *discordgo.Session, cmd *InvokedCommand)
CommandHandler describes what a command handler function should look like
type InvokedCommand ¶
type InvokedCommand struct { Session *discordgo.Session Guild *discordgo.Guild Channel *discordgo.Channel Message *discordgo.Message Member *discordgo.Member User *discordgo.User DBGuild *gophbot.Guild Args []string }
InvokedCommand is a convenience struct that holds all the collected information before invoking a command.
func (*InvokedCommand) HasPermission ¶
func (c *InvokedCommand) HasPermission(permission int) bool
HasPermission is a convenience command that allows for quick & simple permission checking.
Click to show internal directories.
Click to hide internal directories.