From 0b0497f22b84184f3d7b18d8033d7944c38a36ae Mon Sep 17 00:00:00 2001 From: Lexedia Date: Thu, 10 Oct 2024 16:49:26 +0200 Subject: [PATCH 1/2] add new member flags --- lib/src/models/guild/member.dart | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lib/src/models/guild/member.dart b/lib/src/models/guild/member.dart index 9c709d799..fa977c0cd 100644 --- a/lib/src/models/guild/member.dart +++ b/lib/src/models/guild/member.dart @@ -137,6 +137,23 @@ class MemberFlags extends Flags { /// This member has started the guild's onboarding process. static const startedOnboarding = Flag.fromOffset(3); + /// Member is a guest and can only access the voice channel they were invited to. + static const isGuest = Flag.fromOffset(4); + + /// Member has started Server Guide new member actions. + static const startedHomeActions = Flag.fromOffset(5); + + /// Member has completed Server Guide new member actions. + static const completedHomeActions = Flag.fromOffset(6); + + /// Member's username, display name, or nickname is blocked by AutoMod. + static const automodQuarantinedUsername = Flag.fromOffset(7); + + // 1 << 8 is AUTOMOD_QUARANTINED_BIO but it's undocumented and deprecated + + /// Member has dismissed the DM settings upsell + static const dmSettingsUpsellAcknowledged = Flag.fromOffset(9); + /// Whether this member has the [didRejoin] flag. bool get hasRejoined => has(didRejoin); @@ -149,6 +166,21 @@ class MemberFlags extends Flags { /// Whether this member has the [startedOnboarding] flag. bool get didStartOnboarding => has(startedOnboarding); + /// Whether this member has the [isGuest] flag. + bool get isGuestMember => has(isGuest); + + /// Whether this member has the [startedHomeActions] flag. + bool get didStartHomeActions => has(startedHomeActions); + + /// Whether this member has the [completedHomeActions] flag. + bool get didCompleteHomeActions => has(completedHomeActions); + + /// Whether this member has the [automodQuarantinedUsername] flag. + bool get hasAutomodQuarantinedUsername => has(automodQuarantinedUsername); + + /// Whether this member has the [dmSettingsUpsellAcknowledged] flag. + bool get didAcknowledgeDmSettingsUpsell => has(dmSettingsUpsellAcknowledged); + /// Create a new [MemberFlags]. const MemberFlags(super.value); } From d3cb3cbd020138f3bae168565dbce99e0d7f5cbf Mon Sep 17 00:00:00 2001 From: Lexedia Date: Thu, 10 Oct 2024 16:57:35 +0200 Subject: [PATCH 2/2] format --- lib/src/models/guild/member.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/models/guild/member.dart b/lib/src/models/guild/member.dart index fa977c0cd..8c48a17ed 100644 --- a/lib/src/models/guild/member.dart +++ b/lib/src/models/guild/member.dart @@ -150,7 +150,7 @@ class MemberFlags extends Flags { static const automodQuarantinedUsername = Flag.fromOffset(7); // 1 << 8 is AUTOMOD_QUARANTINED_BIO but it's undocumented and deprecated - + /// Member has dismissed the DM settings upsell static const dmSettingsUpsellAcknowledged = Flag.fromOffset(9);