Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGuildCommand ¶
RegisterGuildCommand creates a guild level application command when a guild create event is dispatched. The underlying API call is an upsert and safe to call multiple times.
func RegisterInteractionCreate ¶
func RegisterInteractionCreate(l *slog.Logger, s *discordgo.Session, command InteractionCreate)
RegisterInteractionCreate registers the command to be called during an interaction create event
Types ¶
type Command ¶
type Command interface { // Name of application command to display in UI Name() string // Description of application command to display in UI Description() string }
Command represents a Discord Application Command https://discord.com/developers/docs/interactions/application-commands
type InteractionCreate ¶
type InteractionCreate interface { Command // Run is called each time an InteractionCreate event is dispatched that matches the command name Run(*slog.Logger, *discordgo.Session, *discordgo.InteractionCreate) error }
InteractionCreate is the initial event when an interaction begins from discord https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction
Click to show internal directories.
Click to hide internal directories.