Add plugin support for commands
This commit is contained in:
24
common/chat_commands.go
Normal file
24
common/chat_commands.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package common
|
||||
|
||||
import "github.com/bwmarrin/discordgo"
|
||||
|
||||
type CommandOptionType uint64
|
||||
|
||||
const (
|
||||
CommandTypeString CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionString)
|
||||
CommandTypeInt CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionInteger)
|
||||
CommandTypeBool CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionBoolean)
|
||||
CommandTypeFloat CommandOptionType = CommandOptionType(discordgo.ApplicationCommandOptionNumber)
|
||||
)
|
||||
|
||||
type ChatCommandConfiguration struct {
|
||||
Description string
|
||||
EphemeralResponse bool
|
||||
Options map[string]ChatCommandOption
|
||||
}
|
||||
|
||||
type ChatCommandOption struct {
|
||||
Description string
|
||||
Type CommandOptionType
|
||||
Required bool
|
||||
}
|
||||
Reference in New Issue
Block a user