Skip to content

Commit

Permalink
feat(guildMemberUpdate): Expose oldMember.flags (#1569)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsian03 authored Nov 1, 2024
1 parent 9148597 commit 7aad9f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ declare namespace Eris {
avatar: string | null;
avatarDecorationData?: AvatarDecorationData | null;
communicationDisabledUntil?: number | null;
flags?: number;
nick: string | null;
pending?: boolean;
premiumSince?: number | null;
Expand Down
2 changes: 2 additions & 0 deletions lib/gateway/Shard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ class Shard extends EventEmitter {
oldMember = {
avatar: member.avatar,
communicationDisabledUntil: member.communicationDisabledUntil,
flags: member.flags,
roles: member.roles,
nick: member.nick,
premiumSince: member.premiumSince,
Expand All @@ -1416,6 +1417,7 @@ class Shard extends EventEmitter {
* @prop {Object?} oldMember The old member data, or null if the member wasn't cached
* @prop {String?} oldMember.avatar The hash of the member's guild avatar, or null if no guild avatar
* @prop {Number?} oldMember.communicationDisabledUntil Timestamp of previous timeout expiry. If `null`, the member was not timed out
* @prop {Number?} oldMember.flags The member's flags (see Constants). Defaults to 0
* @prop {String?} oldMember.nick The server nickname of the member
* @prop {Boolean?} oldMember.pending Whether the member has passed the guild's Membership Screening requirements
* @prop {Number?} oldMember.premiumSince Timestamp of when the member boosted the guild
Expand Down

0 comments on commit 7aad9f2

Please sign in to comment.