diff --git a/examples/slash_commands/main.go b/examples/slash_commands/main.go index 64e37bf..1cb3dea 100644 --- a/examples/slash_commands/main.go +++ b/examples/slash_commands/main.go @@ -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, diff --git a/interactions.go b/interactions.go index 1bb244e..49e6215 100644 --- a/interactions.go +++ b/interactions.go @@ -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.