Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WebhookArgument ¶
type WebhookArgument struct { Name string `mapstructure:"name"` Desc string `mapstructure:"description"` Type string `mapstructure:"type"` Req bool `mapstructure:"required"` Default interface{} `mapstructure:"default"` DiscordInfo bool `mapstructure:"discord"` }
Holds an argument for a webhook
type WebhookHeader ¶
Holds a header for a webhook
type WebhookSlashCommand ¶
type WebhookSlashCommand struct { Name string `mapstructure:"name"` Desc string `mapstructure:"description"` Resp string `mapstructure:"response"` RespCode int `mapstructure:"response_code"` URL string `mapstructure:"url"` Method string `mapstructure:"method"` Headers []WebhookHeader `mapstructure:"headers"` SubCmd map[string]WebhookSlashCommand `mapstructure:"subcommands"` SubCmdGrp map[string]WebhookSlashCommand `mapstructure:"subcommand_groups"` Arguments []WebhookArgument `mapstructure:"arguments"` Data map[string]interface{} `mapstructure:"data"` // These fields are context specific CalledOptions []*discordgo.ApplicationCommandInteractionDataOption CalledUser *discordgo.Member }
Overall struct to hold webhook command data
func (WebhookSlashCommand) Handler ¶
func (w WebhookSlashCommand) Handler(s *discordgo.Session, i *discordgo.InteractionCreate)
The actual function that gets called when a command is run Its a value receiver because it will add specific interaction context to the WebhookSlashCommand
func (*WebhookSlashCommand) Info ¶
func (w *WebhookSlashCommand) Info() *discordgo.ApplicationCommand
Returns a pointer to the information needed for discord to register the commands
Click to show internal directories.
Click to hide internal directories.