Skip to content

Commit

Permalink
rename CommandNameLocalizations to NameLocalizations
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Sep 7, 2022
1 parent 766a27c commit 31933fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _examples/application_commands/localization/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
commands = []discord.ApplicationCommandCreate{
discord.SlashCommandCreate{
Name: "say",
CommandNameLocalizations: map[discord.Locale]string{
NameLocalizations: map[discord.Locale]string{
discord.LocaleEnglishGB: "say",
discord.LocaleGerman: "sagen",
},
Expand Down
6 changes: 3 additions & 3 deletions discord/application_command_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type ApplicationCommandCreate interface {

type SlashCommandCreate struct {
Name string `json:"name"`
CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
Description string `json:"description"`
DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"`
Options []ApplicationCommandOption `json:"options,omitempty"`
Expand Down Expand Up @@ -42,7 +42,7 @@ func (SlashCommandCreate) applicationCommandCreate() {}

type UserCommandCreate struct {
Name string `json:"name"`
CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
DefaultMemberPermissions *json.Nullable[Permissions] `json:"default_member_permissions,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
}
Expand Down Expand Up @@ -70,7 +70,7 @@ func (UserCommandCreate) applicationCommandCreate() {}

type MessageCommandCreate struct {
Name string `json:"name"`
CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
DefaultMemberPermissions *json.Nullable[Permissions] `json:"default_member_permissions,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
}
Expand Down
6 changes: 3 additions & 3 deletions discord/application_command_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type ApplicationCommandUpdate interface {

type SlashCommandUpdate struct {
Name *string `json:"name,omitempty"`
CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
Description *string `json:"description,omitempty"`
DescriptionLocalizations *map[Locale]string `json:"description_localizations,omitempty"`
Options *[]ApplicationCommandOption `json:"options,omitempty"`
Expand Down Expand Up @@ -42,7 +42,7 @@ func (SlashCommandUpdate) applicationCommandUpdate() {}

type UserCommandUpdate struct {
Name *string `json:"name,omitempty"`
CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
DefaultMemberPermissions *json.Nullable[Permissions] `json:"default_member_permissions,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
}
Expand Down Expand Up @@ -70,7 +70,7 @@ func (UserCommandUpdate) applicationCommandUpdate() {}

type MessageCommandUpdate struct {
Name *string `json:"name,omitempty"`
CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
NameLocalizations *map[Locale]string `json:"name_localizations,omitempty"`
DefaultMemberPermissions *json.Nullable[Permissions] `json:"default_member_permissions,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
}
Expand Down

0 comments on commit 31933fc

Please sign in to comment.