Documentation ¶
Index ¶
- type Feature
- type SCM
- func (s *SCM) AddFeature(f *Feature)
- func (s *SCM) AddFeatures(ff []*Feature)
- func (s *SCM) CreateCommands(c *discordgo.Session, guildID string) error
- func (s *SCM) DeleteCommands(c *discordgo.Session, guildID string) error
- func (s *SCM) HandleInteraction(c *discordgo.Session, i *discordgo.InteractionCreate)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature struct { Type discordgo.InteractionType Handler func(*discordgo.Session, *discordgo.InteractionCreate) // ApplicationCommand if Type is discordgo.InteractionApplicationCommand or discordgo.InteractionApplicationCommandAutocomplete // Not needed for Type discordgo.InteractionMessageComponent ApplicationCommand *discordgo.ApplicationCommand // CustomID if Type is discordgo.InteractionMessageComponent CustomID string }
type SCM ¶
type SCM struct { Features []*Feature // contains filtered or unexported fields }
func (*SCM) AddFeatures ¶ added in v1.1.0
func (*SCM) CreateCommands ¶
CreateCommands registers any commands (Features with Type discordgo.InteractionApplicationCommand or discordgo.InteractionApplicationCommandAutocomplete) with the API. Leave guildID as empty string for global commands. NOTE: Bot must already be started beforehand.
func (*SCM) DeleteCommands ¶
DeleteCommands deregisters any commands registered using CreateCommands with the API.
func (*SCM) HandleInteraction ¶
func (s *SCM) HandleInteraction(c *discordgo.Session, i *discordgo.InteractionCreate)
Click to show internal directories.
Click to hide internal directories.