Documentation
¶
Index ¶
- type AutocompleteContext
- type AutocompleteHandler
- type Check
- type Command
- type CommandContext
- type CommandHandler
- type Component
- type ComponentContext
- type ComponentHandler
- type ContextReply
- func (c ContextReply) Create() error
- func (c ContextReply) WithAllowedMentions(allowedMentions *discord.AllowedMentions) ContextReply
- func (c ContextReply) WithComponents(components ...discord.InteractiveComponent) ContextReply
- func (c ContextReply) WithContent(content string) ContextReply
- func (c ContextReply) WithEmbed(embed discord.EmbedBuilder) ContextReply
- type Handler
- type I18n
- type Modal
- type ModalContext
- type ModalHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutocompleteContext ¶
type AutocompleteContext struct {
*events.AutocompleteInteractionCreate
Printer *message.Printer
}
type AutocompleteHandler ¶
type AutocompleteHandler func(ctx *AutocompleteContext) error
type Command ¶
type Command struct {
Name string
Check Check[*CommandContext]
AutocompleteCheck Check[*AutocompleteContext]
CommandHandlers map[string]CommandHandler
AutocompleteHandlers map[string]AutocompleteHandler
}
type CommandContext ¶
type CommandContext struct {
*events.ApplicationCommandInteractionCreate
Printer *message.Printer
}
func (CommandContext) Reply ¶
func (c CommandContext) Reply(content string) ContextReply
func (CommandContext) ReplyEmbed ¶
func (c CommandContext) ReplyEmbed(embed discord.EmbedBuilder) ContextReply
type CommandHandler ¶
type CommandHandler func(ctx *CommandContext) error
type Component ¶
type Component struct {
Name string
Check Check[*ComponentContext]
Handler ComponentHandler
}
type ComponentContext ¶
type ComponentContext struct {
*events.ComponentInteractionCreate
Printer *message.Printer
Args []string
}
type ComponentHandler ¶
type ComponentHandler func(ctx *ComponentContext) error
type ContextReply ¶
type ContextReply struct {
discord.MessageCreate
Context CommandContext
}
func (ContextReply) Create ¶
func (c ContextReply) Create() error
func (ContextReply) WithAllowedMentions ¶
func (c ContextReply) WithAllowedMentions(allowedMentions *discord.AllowedMentions) ContextReply
func (ContextReply) WithComponents ¶
func (c ContextReply) WithComponents(components ...discord.InteractiveComponent) ContextReply
func (ContextReply) WithContent ¶
func (c ContextReply) WithContent(content string) ContextReply
func (ContextReply) WithEmbed ¶
func (c ContextReply) WithEmbed(embed discord.EmbedBuilder) ContextReply
type Handler ¶
type Handler struct {
Logger log.Logger
I18n *I18n
NewCtxFunc func() context.Context
Commands map[string]Command
Components map[string]Component
Modals map[string]Modal
}
func (*Handler) AddCommands ¶
func (*Handler) AddComponents ¶
type I18n ¶
func (*I18n) AddLanguage ¶
type Modal ¶
type Modal struct {
Name string
Check Check[*ModalContext]
Handler ModalHandler
}
type ModalContext ¶
type ModalContext struct {
*events.ModalSubmitInteractionCreate
Printer *message.Printer
Args []string
}
type ModalHandler ¶
type ModalHandler func(ctx *ModalContext) error
Click to show internal directories.
Click to hide internal directories.
