diff --git a/src/model/permissions.rs b/src/model/permissions.rs index 0076b052746..dd95c40a95a 100644 --- a/src/model/permissions.rs +++ b/src/model/permissions.rs @@ -196,6 +196,8 @@ __impl_bitflags! { ADD_REACTIONS = 0b0000_0000_0000_0000_0000_0000_0100_0000; // Allows viewing a guild's audit logs. VIEW_AUDIT_LOG = 0b0000_0000_0000_0000_0000_0000_1000_0000; + /// Allows the use of priority speaking in voice channels. + PRIORITY_SPEAKER = 0b0000_0000_0000_0000_0000_0001_0000_0000; /// Allows reading messages in a guild channel. If a user does not have /// this permission, then they will not be able to see the channel. READ_MESSAGES = 0b0000_0000_0000_0000_0000_0100_0000_0000; @@ -304,6 +306,12 @@ impl Permissions { /// [View Audit Log]: constant.VIEW_AUDIT_LOG.html pub fn view_audit_log(&self) -> bool { self.contains(Self::VIEW_AUDIT_LOG) } + /// Shorthand for checking that the set of permission contains the + /// [Priority Speaker] permission. + /// + /// [Priority Speaker]: #associatedconstant.PRIORITY_SPEAKER + pub fn priority_speaker(&self) -> bool { self.contains(Self::PRIORITY_SPEAKER) } + /// Shorthand for checking that the set of permissions contains the /// [Create Invite] permission. ///