1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-02 11:52:56 +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:
ayn2op 2023-01-27 02:39:19 +05:30 committed by GitHub
parent 57dbdbdbd0
commit 05dbf0e2b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.