mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-12-08 04:57:19 +00:00
Compare commits
4 commits
041aa39e91
...
62b2178ffc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62b2178ffc | ||
|
|
eabc1be595 | ||
|
|
e93079e2de | ||
|
|
ad0a88bb4f |
|
|
@ -29,7 +29,7 @@ const (
|
|||
ElevatedMFA
|
||||
)
|
||||
|
||||
type SystemChannelFlags uint8
|
||||
type SystemChannelFlags uint16
|
||||
|
||||
// https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
const (
|
||||
|
|
@ -37,6 +37,14 @@ const (
|
|||
SuppressJoinNotifications SystemChannelFlags = 1 << iota
|
||||
// SuppressPremiumSubscriptions suppresses server boost notifications.
|
||||
SuppressPremiumSubscriptions
|
||||
// SuppressGuildReminderNotifications suppresses server setup tips.
|
||||
SuppressGuildReminderNotifications
|
||||
// SuppressJoinNotificationReplies hides member join sticker reply buttons.
|
||||
SuppressJoinNotificationReplies
|
||||
// SuppressRoleSubscriptionPurchaseNotifications suppresses role subscription purchase and renewal notifications.
|
||||
SuppressRoleSubscriptionPurchaseNotifications
|
||||
// SuppressRoleSubscriptionPurchaseNotificationReplies hides role subscription sticker reply buttons.
|
||||
SuppressRoleSubscriptionPurchaseNotificationReplies
|
||||
)
|
||||
|
||||
type GuildFeature string
|
||||
|
|
|
|||
|
|
@ -94,14 +94,25 @@ func (id *Identifier) QueryGateway(ctx context.Context) (gatewayURL string, err
|
|||
return
|
||||
}
|
||||
|
||||
const (
|
||||
IdentifyOS IdentifyPropertyKey = "os"
|
||||
IdentifyBrowser IdentifyPropertyKey = "browser"
|
||||
IdentifyDevice IdentifyPropertyKey = "device"
|
||||
)
|
||||
|
||||
// DefaultIdentity is used as the default identity when initializing a new
|
||||
// Gateway.
|
||||
var DefaultIdentity = IdentifyProperties{
|
||||
OS: runtime.GOOS,
|
||||
Browser: "Arikawa",
|
||||
Device: "Arikawa",
|
||||
IdentifyOS: runtime.GOOS,
|
||||
IdentifyBrowser: "Arikawa",
|
||||
IdentifyDevice: "Arikawa",
|
||||
}
|
||||
|
||||
type (
|
||||
IdentifyPropertyKey string
|
||||
IdentifyProperties map[IdentifyPropertyKey]any
|
||||
)
|
||||
|
||||
// IdentifyCommand is a command for Op 2. It is the struct for a data that's
|
||||
// sent over in an Identify command.
|
||||
type IdentifyCommand struct {
|
||||
|
|
@ -176,26 +187,6 @@ func (i *IdentifyCommand) HasIntents(intents Intents) bool {
|
|||
return Intents(*i.Intents).Has(intents)
|
||||
}
|
||||
|
||||
type IdentifyProperties struct {
|
||||
// Required
|
||||
OS string `json:"os"` // GOOS
|
||||
Browser string `json:"browser"` // Arikawa
|
||||
Device string `json:"device"` // Arikawa
|
||||
|
||||
// Optional (not applicable to bots)
|
||||
ClientBuildNumber int `json:"client_build_number,omitempty"`
|
||||
BrowserUserAgent string `json:"browser_user_agent,omitempty"`
|
||||
BrowserVersion string `json:"browser_version,omitempty"`
|
||||
OSVersion string `json:"os_version,omitempty"`
|
||||
Referrer string `json:"referrer,omitempty"`
|
||||
ReferrerCurrent string `json:"referrer_current,omitempty"`
|
||||
ReferrerDomainCurrent string `json:"referrer_domain_current,omitempty"`
|
||||
ReferringDomain string `json:"referring_domain,omitempty"`
|
||||
ReleaseChannel string `json:"release_channel,omitempty"`
|
||||
SystemLocale discord.Language `json:"system_locale,omitempty"`
|
||||
HasClientMods bool `json:"has_client_mods,omitempty"`
|
||||
}
|
||||
|
||||
// Shard is a type for two numbers that represent the Bot's shard configuration.
|
||||
// The first number is the shard's ID, which could be obtained through the
|
||||
// ShardID method. The second number is the total number of shards, which could
|
||||
|
|
|
|||
5
go.mod
5
go.mod
|
|
@ -1,12 +1,13 @@
|
|||
module github.com/diamondburned/arikawa/v3
|
||||
|
||||
go 1.23
|
||||
toolchain go1.24.1
|
||||
|
||||
require (
|
||||
github.com/gorilla/schema v1.4.1
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
golang.org/x/crypto v0.32.0
|
||||
golang.org/x/crypto v0.38.0
|
||||
golang.org/x/time v0.10.0
|
||||
)
|
||||
|
||||
require golang.org/x/sys v0.29.0 // indirect
|
||||
require golang.org/x/sys v0.33.0 // indirect
|
||||
|
|
|
|||
8
go.sum
8
go.sum
|
|
@ -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/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
||||
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
||||
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
|
||||
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
|
||||
golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
|
|
|
|||
Loading…
Reference in a new issue