Channel type restriction (#1015)
This commit is contained in:
parent
842ddb357a
commit
4249df2359
2 changed files with 10 additions and 4 deletions
|
@ -76,7 +76,12 @@ var (
|
|||
Type: discordgo.ApplicationCommandOptionChannel,
|
||||
Name: "channel-option",
|
||||
Description: "Channel option",
|
||||
Required: false,
|
||||
// Channel type mask
|
||||
ChannelTypes: []discordgo.ChannelType{
|
||||
discordgo.ChannelTypeGuildText,
|
||||
discordgo.ChannelTypeGuildVoice,
|
||||
},
|
||||
Required: false,
|
||||
},
|
||||
{
|
||||
Type: discordgo.ApplicationCommandOptionUser,
|
||||
|
|
|
@ -89,9 +89,10 @@ type ApplicationCommandOption struct {
|
|||
// NOTE: This feature was on the API, but at some point developers decided to remove it.
|
||||
// So I commented it, until it will be officially on the docs.
|
||||
// Default bool `json:"default"`
|
||||
Required bool `json:"required"`
|
||||
Choices []*ApplicationCommandOptionChoice `json:"choices"`
|
||||
Options []*ApplicationCommandOption `json:"options"`
|
||||
Required bool `json:"required"`
|
||||
Choices []*ApplicationCommandOptionChoice `json:"choices"`
|
||||
Options []*ApplicationCommandOption `json:"options"`
|
||||
ChannelTypes []ChannelType `json:"channel_types"`
|
||||
}
|
||||
|
||||
// ApplicationCommandOptionChoice represents a slash command option choice.
|
||||
|
|
Loading…
Reference in a new issue