1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-06-20 10:22:07 +00:00

api: Add localization fields to Application Command creation data

This commit is contained in:
Neo 2022-04-12 22:44:35 +09:00 committed by diamondburned
parent f249715c9d
commit f5f46f5fd4

View file

@ -19,13 +19,15 @@ func (c *Client) CurrentApplication() (*discord.Application, error) {
) )
} }
// https://discord.com/developers/docs/interactions/slash-commands#create-global-application-command-json-params // https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
type CreateCommandData struct { type CreateCommandData struct {
Name string `json:"name"` Name string `json:"name"`
Description string `json:"description"` NameLocalizations discord.StringLocales `json:"name_localizations,omitempty"`
Options discord.CommandOptions `json:"options,omitempty"` Description string `json:"description"`
NoDefaultPermission bool `json:"-"` DescriptionLocalizations discord.StringLocales `json:"description_localizations,omitempty"`
Type discord.CommandType `json:"type,omitempty"` Options discord.CommandOptions `json:"options,omitempty"`
NoDefaultPermission bool `json:"-"`
Type discord.CommandType `json:"type,omitempty"`
} }
func (c CreateCommandData) MarshalJSON() ([]byte, error) { func (c CreateCommandData) MarshalJSON() ([]byte, error) {