mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-07-29 00:42:16 +00:00
Compare commits
4 commits
6f1361bd89
...
0e2f835819
Author | SHA1 | Date | |
---|---|---|---|
|
0e2f835819 | ||
|
0b9742a410 | ||
|
504343fb9d | ||
|
8fc9b2f028 |
|
@ -22,16 +22,17 @@ func (c *Client) CurrentApplication() (*discord.Application, error) {
|
|||
// https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
|
||||
// https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
||||
type CreateCommandData struct {
|
||||
ID discord.CommandID `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
NameLocalizations discord.StringLocales `json:"name_localizations,omitempty"`
|
||||
Description string `json:"description"`
|
||||
DescriptionLocalizations discord.StringLocales `json:"description_localizations,omitempty"`
|
||||
Options discord.CommandOptions `json:"options,omitempty"`
|
||||
DefaultMemberPermissions *discord.Permissions `json:"default_member_permissions,string,omitempty"`
|
||||
NoDMPermission bool `json:"-"`
|
||||
NoDefaultPermission bool `json:"-"`
|
||||
Type discord.CommandType `json:"type,omitempty"`
|
||||
ID discord.CommandID `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
NameLocalizations discord.StringLocales `json:"name_localizations,omitempty"`
|
||||
Description string `json:"description"`
|
||||
DescriptionLocalizations discord.StringLocales `json:"description_localizations,omitempty"`
|
||||
Options discord.CommandOptions `json:"options,omitempty"`
|
||||
DefaultMemberPermissions *discord.Permissions `json:"default_member_permissions,string,omitempty"`
|
||||
NoDMPermission bool `json:"-"`
|
||||
NoDefaultPermission bool `json:"-"`
|
||||
Type discord.CommandType `json:"type,omitempty"`
|
||||
IntegrationTypes []discord.ApplicationIntegrationType `json:"integration_types,omitempty"`
|
||||
}
|
||||
|
||||
func (c CreateCommandData) MarshalJSON() ([]byte, error) {
|
||||
|
|
|
@ -131,3 +131,10 @@ type InstallParams struct {
|
|||
// Permissions is the permissions to request for the bot role.
|
||||
Permissions Permissions `json:"permissions,string"`
|
||||
}
|
||||
|
||||
type ApplicationIntegrationType uint16
|
||||
|
||||
const (
|
||||
ApplicationIntegrationTypeGuild ApplicationIntegrationType = iota
|
||||
ApplicationIntegrationTypeUser
|
||||
)
|
||||
|
|
|
@ -62,6 +62,9 @@ type Command struct {
|
|||
// Version is an autoincrementing version identifier updated during
|
||||
// substantial record changes
|
||||
Version Snowflake `json:"version,omitempty"`
|
||||
// Installation contexts where the command is available, only for
|
||||
// globally-scoped commands.
|
||||
IntegrationTypes []ApplicationIntegrationType `json:"integration_types,omitempty"`
|
||||
}
|
||||
|
||||
// Language is a string type for language codes, such as "en-US" or "fr". Refer
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8=
|
||||
golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E=
|
||||
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
|
|
Loading…
Reference in a new issue