Spaces:
Paused
Paused
File size: 2,078 Bytes
83a59ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | package discord
// CommandCreateRequest is the request for creating a new command
type CommandCreateRequest struct {
Name string `json:"name"`
Type int `json:"type"`
Description string `json:"description"`
Options []CommandCreateRequestOption `json:"options"`
}
// CommandCreateRequestOption are options for creating a command
type CommandCreateRequestOption struct {
Name string `json:"name"`
Description string `json:"description"`
Type int `json:"type"`
Required bool `json:"required"`
}
// CommandCreateResponse is the response after creating a command
type CommandCreateResponse struct {
ID string `json:"id"`
ApplicationID string `json:"application_id"`
Version string `json:"version"`
DefaultMemberPermissions any `json:"default_member_permissions"`
Type int `json:"type"`
Name string `json:"name"`
NameLocalizations any `json:"name_localizations"`
Description string `json:"description"`
DescriptionLocalizations any `json:"description_localizations"`
GuildID string `json:"guild_id"`
Options []CommandCreateResponseOption `json:"options"`
Nsfw bool `json:"nsfw"`
}
// CommandCreateResponseOption are options after creating a command
type CommandCreateResponseOption struct {
Type int `json:"type"`
Name string `json:"name"`
NameLocalizations any `json:"name_localizations"`
Description string `json:"description"`
DescriptionLocalizations any `json:"description_localizations"`
Required bool `json:"required"`
}
|