Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAnswerMessage = errors.New("answer message is not valid") ErrNoSubCommandHandler = errors.New("no sub command handler provided") ErrInvalidInteraction = errors.New("message interaction is not valid") ErrRequestPropertyNotFound = errors.New("request property is not found") )
Functions ¶
func IsApplicationCommand ¶
func IsApplicationCommand(i *discordgo.InteractionCreate) bool
func IsMessageCommand ¶
func IsMessageCommand(i *discordgo.InteractionCreate) bool
Types ¶
type AbstractCommand ¶
type AbstractCommand struct{}
func (*AbstractCommand) CallHandler ¶
func (command *AbstractCommand) CallHandler(s *discordgo.Session, i *discordgo.InteractionCreate, handlers DiscordHandlers)
func (*AbstractCommand) HandleSubCommand ¶
func (command *AbstractCommand) HandleSubCommand(handlers map[string]DiscordHandler) DiscordHandler
type Description ¶
type DiscordCommand ¶
type DiscordCommand interface { GetName() string GetDescriptions(lg discordgo.Locale) []Description Matches(i *discordgo.InteractionCreate) bool Handle(s *discordgo.Session, i *discordgo.InteractionCreate) }
type DiscordHandler ¶
type DiscordHandler func(s *discordgo.Session, i *discordgo.InteractionCreate)
type DiscordHandlers ¶
type DiscordHandlers map[discordgo.InteractionType]DiscordHandler
type SubCommandHandlers ¶
type SubCommandHandlers map[string]DiscordHandler
Click to show internal directories.
Click to hide internal directories.