Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(err error) *discordgo.InteractionResponseData
ErrorResponse returns discordgo.InteractionResponseData with the error message as content.
func MemberChannel ¶
MemberChannel returns the id of the current channel the user is in or and empty string if the user is not in a channel.
func Option ¶
func Option(opts []*discordgo.ApplicationCommandInteractionDataOption, name string) *discordgo.ApplicationCommandInteractionDataOption
Option searches the given options by its name and returns it.
Types ¶
type Command ¶
type Command struct { discordgo.ApplicationCommand // Autocomplete is the Handler to be called when the user requests auto-completion. Autocomplete Handler // Command is the Handler to be called when the command is run. Command Handler }
Command represents a (application) slash-command.
type Handler ¶
type Handler = func(s *discordgo.Session, evt *discordgo.InteractionCreate) *discordgo.InteractionResponseData
Handler is a function that handles a discordgo.InteractionCreate event.
Click to show internal directories.
Click to hide internal directories.