Channel type restriction (#1015)
This commit is contained in:
parent
842ddb357a
commit
4249df2359
2 changed files with 10 additions and 4 deletions
|
@ -76,6 +76,11 @@ var (
|
||||||
Type: discordgo.ApplicationCommandOptionChannel,
|
Type: discordgo.ApplicationCommandOptionChannel,
|
||||||
Name: "channel-option",
|
Name: "channel-option",
|
||||||
Description: "Channel option",
|
Description: "Channel option",
|
||||||
|
// Channel type mask
|
||||||
|
ChannelTypes: []discordgo.ChannelType{
|
||||||
|
discordgo.ChannelTypeGuildText,
|
||||||
|
discordgo.ChannelTypeGuildVoice,
|
||||||
|
},
|
||||||
Required: false,
|
Required: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -92,6 +92,7 @@ type ApplicationCommandOption struct {
|
||||||
Required bool `json:"required"`
|
Required bool `json:"required"`
|
||||||
Choices []*ApplicationCommandOptionChoice `json:"choices"`
|
Choices []*ApplicationCommandOptionChoice `json:"choices"`
|
||||||
Options []*ApplicationCommandOption `json:"options"`
|
Options []*ApplicationCommandOption `json:"options"`
|
||||||
|
ChannelTypes []ChannelType `json:"channel_types"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplicationCommandOptionChoice represents a slash command option choice.
|
// ApplicationCommandOptionChoice represents a slash command option choice.
|
||||||
|
|
Loading…
Reference in a new issue