1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-07-27 07:50:55 +00:00

Compare commits

...

6 commits

Author SHA1 Message Date
Merlin 6f1361bd89
Merge 0b9742a410 into 3a51367bf8 2025-01-10 11:22:17 +01:00
dependabot[bot] 3a51367bf8 build(deps): bump golang.org/x/time from 0.8.0 to 0.9.0
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/time/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-09 12:39:33 -08:00
dependabot[bot] d0cb786fda build(deps): bump golang.org/x/crypto from 0.31.0 to 0.32.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-09 00:24:43 -08:00
merlinfuchs 0b9742a410 add integration types to discord.Command struct 2024-12-01 12:53:24 +01:00
merlinfuchs 504343fb9d fix json marshal 2024-12-01 12:53:18 +01:00
merlinfuchs 8fc9b2f028 add integration types to command 2024-12-01 12:53:13 +01:00
6 changed files with 33 additions and 19 deletions

View file

@ -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#create-global-application-command
// https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands // https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
type CreateCommandData struct { type CreateCommandData struct {
ID discord.CommandID `json:"id,omitempty"` ID discord.CommandID `json:"id,omitempty"`
Name string `json:"name"` Name string `json:"name"`
NameLocalizations discord.StringLocales `json:"name_localizations,omitempty"` NameLocalizations discord.StringLocales `json:"name_localizations,omitempty"`
Description string `json:"description"` Description string `json:"description"`
DescriptionLocalizations discord.StringLocales `json:"description_localizations,omitempty"` DescriptionLocalizations discord.StringLocales `json:"description_localizations,omitempty"`
Options discord.CommandOptions `json:"options,omitempty"` Options discord.CommandOptions `json:"options,omitempty"`
DefaultMemberPermissions *discord.Permissions `json:"default_member_permissions,string,omitempty"` DefaultMemberPermissions *discord.Permissions `json:"default_member_permissions,string,omitempty"`
NoDMPermission bool `json:"-"` NoDMPermission bool `json:"-"`
NoDefaultPermission bool `json:"-"` NoDefaultPermission bool `json:"-"`
Type discord.CommandType `json:"type,omitempty"` Type discord.CommandType `json:"type,omitempty"`
IntegrationTypes []discord.ApplicationIntegrationType `json:"integration_types,omitempty"`
} }
func (c CreateCommandData) MarshalJSON() ([]byte, error) { func (c CreateCommandData) MarshalJSON() ([]byte, error) {

View file

@ -131,3 +131,10 @@ type InstallParams struct {
// Permissions is the permissions to request for the bot role. // Permissions is the permissions to request for the bot role.
Permissions Permissions `json:"permissions,string"` Permissions Permissions `json:"permissions,string"`
} }
type ApplicationIntegrationType uint16
const (
ApplicationIntegrationTypeGuild ApplicationIntegrationType = iota
ApplicationIntegrationTypeUser
)

View file

@ -62,6 +62,9 @@ type Command struct {
// Version is an autoincrementing version identifier updated during // Version is an autoincrementing version identifier updated during
// substantial record changes // substantial record changes
Version Snowflake `json:"version,omitempty"` 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 // Language is a string type for language codes, such as "en-US" or "fr". Refer

6
go.mod
View file

@ -5,8 +5,8 @@ go 1.18
require ( require (
github.com/gorilla/schema v1.4.1 github.com/gorilla/schema v1.4.1
github.com/gorilla/websocket v1.5.3 github.com/gorilla/websocket v1.5.3
golang.org/x/crypto v0.31.0 golang.org/x/crypto v0.32.0
golang.org/x/time v0.8.0 golang.org/x/time v0.9.0
) )
require golang.org/x/sys v0.28.0 // indirect require golang.org/x/sys v0.29.0 // indirect

12
go.sum
View file

@ -2,9 +2,9 @@ github.com/gorilla/schema v1.4.1 h1:jUg5hUjCSDZpNGLuXQOgIWGdlgrIdYvgQ0wZtdK1M3E=
github.com/gorilla/schema v1.4.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM= github.com/gorilla/schema v1.4.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=

View file

@ -1,6 +1,9 @@
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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/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.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.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.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= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=