Documentation ¶
Index ¶
- type Bot
- func (b *Bot) Close() error
- func (b *Bot) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (b *Bot) RegisterCommand(c *Command) error
- func (b *Bot) RegisterComponent(c *Component)
- func (b *Bot) RegisterHandler(handler any) func()
- func (b *Bot) Run() error
- func (b *Bot) UnregisterCommands() error
- type Command
- type Component
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot structure.
func (*Bot) Handle ¶
func (b *Bot) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
Handle discord application command.
func (*Bot) RegisterCommand ¶
Registering a new discord application command.
func (*Bot) RegisterComponent ¶
Registering a new discord message component.
func (*Bot) RegisterHandler ¶
Registering a discord bot handler.
func (*Bot) UnregisterCommands ¶
Unregister all discord application commands.
type Command ¶
type Command struct { // Discord application command. discordgo.ApplicationCommand // Discord bot application command handler. Handler func(s *discordgo.Session, i *discordgo.InteractionCreate) }
Discord application command structure.
Click to show internal directories.
Click to hide internal directories.