Documentation ¶
Index ¶
- Variables
- func AddCommand(cmd Command)
- func AddCommands(cmds ...Command)
- func AddData(session *discordgo.Session) error
- func DropCommand(cmd Command)
- func DropData(session *discordgo.Session) error
- func DropDataManual(session *discordgo.Session, command Command) error
- func GetCommandData(name string) *discordgo.ApplicationCommand
- func Handler(session *discordgo.Session, event *discordgo.InteractionCreate)
- func IsCommandNil() bool
- func QueryCommandList() []*discordgo.ApplicationCommandOptionChoice
- type Command
- type GuildCommand
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands []Command
Functions ¶
func AddCommand ¶ added in v0.4.0
func AddCommand(cmd Command)
AddCommand add target application command handler
func AddCommands ¶ added in v0.4.0
func AddCommands(cmds ...Command)
AddCommands add many application command handlers
func DropCommand ¶ added in v0.4.0
func DropCommand(cmd Command)
DropCommand delete target application command handler
func DropDataManual ¶ added in v0.4.0
DropDataManual delete target application command data
func GetCommandData ¶
func GetCommandData(name string) *discordgo.ApplicationCommand
GetCommandData getting target command data
func Handler ¶ added in v1.0.0
func Handler(session *discordgo.Session, event *discordgo.InteractionCreate)
func IsCommandNil ¶ added in v1.0.0
func IsCommandNil() bool
IsCommandNil checking Commands array is nil
func QueryCommandList ¶
func QueryCommandList() []*discordgo.ApplicationCommandOptionChoice
QueryCommandList getting all command list
Types ¶
type Command ¶
type Command struct { Data *discordgo.ApplicationCommand Usage string Execute func(session *discordgo.Session, event *discordgo.InteractionCreate) error }
type GuildCommand ¶ added in v1.3.1
func (*GuildCommand) AddGuildData ¶ added in v1.3.1
func (g *GuildCommand) AddGuildData(session *discordgo.Session) error
AddGuildData add target guild application commands data
func (*GuildCommand) BuildHandler ¶ added in v1.3.1
func (g *GuildCommand) BuildHandler(session *discordgo.Session)
Build create guild command handler
func (*GuildCommand) DropGuildData ¶ added in v1.3.1
func (g *GuildCommand) DropGuildData(session *discordgo.Session) error
DropGuildData delete target guild application commands data
Click to show internal directories.
Click to hide internal directories.