You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/application_commands.go
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,8 @@ type ApplicationCommand struct {
37
37
Descriptionstring`json:"description"`// 1-100 character description for CHAT_INPUT command, empty string for USER and MESSAGE command
38
38
DescriptionLocalizationsLocalizationDict`json:"description_localizations,omitempty"`// Localization dictionary for the description field. Values follow the same restrictions as description
39
39
Options []ApplicationCommandOption`json:"options,omitempty"`// the parameters for the command, max 25; CHAT_INPUT
40
-
DefaultPermissionsbool`json:"default_permissions,omitempty"`// default true; whether the command is enabled by default when added to a guild
40
+
DefaultMemberPermission*string`json:"default_member_permission"`// Set of permissions represented as a bit set
41
+
DmPermissionbool`json:"dm_permission,omitempty"`// Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
41
42
VersionSnowflake`json:"version"`// autoincrementing version identifier updated during substantial record changes
42
43
}
43
44
@@ -64,7 +65,9 @@ type ApplicationCommandOption struct {
64
65
ChannelTypes []ChannelType`json:"channel_types,omitempty"`// if the option is a channel type, the channels shown will be restricted to these types
65
66
MinValueinterface{} `json:"min_value,omitempty"`// if the option is an INTEGER or NUMBER type, the minimum value permitted; integer for INTEGER options, double for NUMBER options
66
67
MaxValueinterface{} `json:"max_value,omitempty"`// if the option is an INTEGER or NUMBER type, the maximum value permitted; integer for INTEGER options, double for NUMBER options
67
-
Autocompletebool`json:"autocomplete,omitempty"`// enable autocomplete interactions for this option
68
+
MinLengthint`json:"min_length,omitempty"`// For option type STRING, the minimum allowed length (minimum of 0, maximum of 6000)
69
+
MaxLengthint`json:"max_length,omitempty"`// For option type STRING, the maximum allowed length (minimum of 1, maximum of 6000)
70
+
Autocompletebool`json:"autocomplete,omitempty"`// If autocomplete interactions are enabled for this STRING, INTEGER, or NUMBER type option
68
71
}
69
72
70
73
// ApplicationCommandOptionType - The option type of the command
@@ -123,8 +126,9 @@ type ApplicationCommandPermissionType int
123
126
124
127
//goland:noinspection GoUnusedConst
125
128
const (
126
-
PermissionTypeRoleApplicationCommandPermissionType=iota+1// ROLE
127
-
PermissionTypeUser// USER
129
+
PermissionTypeRoleApplicationCommandPermissionType=iota+1// ROLE
130
+
PermissionTypeUser// USER
131
+
PermissionTypeChannel// CHANNEL
128
132
)
129
133
130
134
// GetGlobalApplicationCommands - Fetch all the global commands for your application.
0 commit comments