From e10d0ffb680e28ed74397875bb6a0a4b2fa411f7 Mon Sep 17 00:00:00 2001 From: Lexie Date: Thu, 10 Oct 2024 23:33:33 +0200 Subject: [PATCH] add new member flags (#715) * add new member flags * format --- 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..8c48a17ed 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); }