mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-12-02 20:02:53 +00:00
discord: Add Flags field to Member struct (#369)
Reference: https://github.com/discord/discord-api-docs/pull/5874
This commit is contained in:
parent
57dbdbdbd0
commit
05dbf0e2b4
|
@ -389,6 +389,9 @@ type Member struct {
|
|||
// Mute specifies whether the user is muted in voice channels.
|
||||
Mute bool `json:"mute"`
|
||||
|
||||
// Flags is the member's flags represented as a bit set, defaults to 0.
|
||||
Flags MemberFlags `json:"flags"`
|
||||
|
||||
// IsPending specifies whether the user has not yet passed the guild's Membership Screening requirements
|
||||
IsPending bool `json:"pending"`
|
||||
}
|
||||
|
@ -416,6 +419,15 @@ func (m Member) AvatarURLWithType(t ImageType, guildID GuildID) string {
|
|||
return "https://cdn.discordapp.com/guilds/" + guildID.String() + "/users/" + m.User.ID.String() + "/avatars/" + t.format(m.Avatar)
|
||||
}
|
||||
|
||||
type MemberFlags uint8
|
||||
|
||||
const (
|
||||
MemberFlagsDidRejoin = 1 << iota
|
||||
MemberFlagsCompletedOnboarding
|
||||
MemberFlagsBypassesVerification
|
||||
MemberFlagsStartedOnboarding
|
||||
)
|
||||
|
||||
// https://discord.com/developers/docs/resources/guild#ban-object
|
||||
type Ban struct {
|
||||
// Reason is the reason for the ban.
|
||||
|
|
Loading…
Reference in a new issue