Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App running a bot session
type Command ¶
type Command interface { Namer Build() *discordgo.ApplicationCommand MatchInteraction(id string) bool HandleCommand(ctx context.Context, session *discordgo.Session, i *discordgo.InteractionCreate) error HandleInteractions(ctx context.Context, session *discordgo.Session, i *discordgo.InteractionCreate) error }
Command defines the interface for a Discord application
type Guild ¶
type Guild struct {
// contains filtered or unexported fields
}
Guild is a kind of bot that's specific to a Discord guild
func (Guild) Finalize ¶
Finalize installs all registered commands and operands into the provided session
func (Guild) WithCommand ¶
WithCommand returns a Guild with the Command registered
func (Guild) WithOperand ¶
WithOperand returns a Guild with the Operand registered
type Multi ¶
type Multi struct {
// contains filtered or unexported fields
}
Multi is a kind of bot that supports multiple Discord Guilds
func (Multi) Finalize ¶
Finalize installs all registered commands and operands into the provided session
func (Multi) WithCommand ¶
WithCommand returns a Multi with the Command registered
func (Multi) WithOperand ¶
WithOperand returns a Multi with the Operand registered
type Operand ¶
type Operand interface { Namer AddHandlers(ctx context.Context, session *discordgo.Session) Intents() discordgo.Intent }
Operand defines the interface for a default bot component listening for events