mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-05 19:57:02 +00:00
Discord: Updated the Presence struct to be smaller
This commit omits a few fields in the Presence struct in accordance to the new v8 structures. Removed roles, premium_since, and nick
This commit is contained in:
parent
2af51c9a5a
commit
994ddca1e1
|
@ -300,41 +300,33 @@ func (r Role) Mention() string {
|
|||
return r.ID.Mention()
|
||||
}
|
||||
|
||||
// ClientStaus is the user's platform-dependent status.
|
||||
//
|
||||
// https://discord.com/developers/docs/topics/gateway#client-status-object
|
||||
type ClientStatus struct {
|
||||
// Desktop is the user's status set for an active desktop (Windows,
|
||||
// Linux, Mac) application session.
|
||||
Desktop Status `json:"desktop,omitempty"`
|
||||
// Mobile is the user's status set for an active mobile (iOS, Android)
|
||||
// application session.
|
||||
Mobile Status `json:"mobile,omitempty"`
|
||||
// Web is the user's status set for an active web (browser, bot
|
||||
// account) application session.
|
||||
Web Status `json:"web,omitempty"`
|
||||
}
|
||||
|
||||
// https://discord.com/developers/docs/topics/gateway#presence-update
|
||||
type Presence struct {
|
||||
// User is the user presence is being updated for.
|
||||
User User `json:"user"`
|
||||
// RoleIDs are the roles this user is in.
|
||||
RoleIDs []RoleID `json:"roles"`
|
||||
|
||||
// These fields are only filled in gateway events, according to the
|
||||
// documentation.
|
||||
|
||||
// GuildID is the id of the guild
|
||||
GuildID GuildID `json:"guild_id"`
|
||||
|
||||
// Status is either "idle", "dnd", "online", or "offline".
|
||||
Status Status `json:"status"`
|
||||
// Activities are the user's current activities.
|
||||
Activities []Activity `json:"activities"`
|
||||
// ClientStaus is the user's platform-dependent status.
|
||||
//
|
||||
// https://discord.com/developers/docs/topics/gateway#client-status-object
|
||||
ClientStatus struct {
|
||||
// Desktop is the user's status set for an active desktop (Windows,
|
||||
// Linux, Mac) application session.
|
||||
Desktop Status `json:"desktop,omitempty"`
|
||||
// Mobile is the user's status set for an active mobile (iOS, Android)
|
||||
// application session.
|
||||
Mobile Status `json:"mobile,omitempty"`
|
||||
// Web is the user's status set for an active web (browser, bot
|
||||
// account) application session.
|
||||
Web Status `json:"web,omitempty"`
|
||||
} `json:"client_status"`
|
||||
// Premium since specifies when the user started boosting the guild.
|
||||
PremiumSince Timestamp `json:"premium_since,omitempty"`
|
||||
// Nick is this users guild nickname (if one is set).
|
||||
Nick string `json:"nick,omitempty"`
|
||||
ClientStatus ClientStatus `json:"client_status"`
|
||||
}
|
||||
|
||||
// https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
|
|
Loading…
Reference in a new issue