aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-14 21:28:39 -0800
committerAustin Hellyer <[email protected]>2016-11-14 21:28:39 -0800
commit0ed850774b65b8c65bc6dc14c833938698c9c22e (patch)
tree7c1f5d4c192188f1935266ad7c26319c159a9c93 /src
parentGitLab: test for voice (diff)
downloadserenity-0ed850774b65b8c65bc6dc14c833938698c9c22e.tar.xz
serenity-0ed850774b65b8c65bc6dc14c833938698c9c22e.zip
Add missing permission shorthands
Diffstat (limited to 'src')
-rw-r--r--src/model/permissions.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/model/permissions.rs b/src/model/permissions.rs
index c2b339e..49a5069 100644
--- a/src/model/permissions.rs
+++ b/src/model/permissions.rs
@@ -251,6 +251,14 @@ impl Permissions {
}
/// Shorthand for checking that the set of permissions contains the
+ /// [Add Reactions] permission.
+ ///
+ /// [Add Reactions]: constant.ADD_REACTIONS.html
+ pub fn add_reactions(&self) -> bool {
+ self.contains(self::ADD_REACTIONS)
+ }
+
+ /// Shorthand for checking that the set of permissions contains the
/// [Administrator] permission.
///
/// [Administrator]: constant.ADMINISTRATOR.html
@@ -451,6 +459,14 @@ impl Permissions {
}
/// Shorthand for checking that the set of permissions contains the
+ /// [Use External Emojis] permission.
+ ///
+ /// [Use External Emojis]: constant.USE_EXTERNAL_EMOJIS.html
+ pub fn use_external_emojis(&self) -> bool {
+ self.contains(self::USE_EXTERNAL_EMOJIS)
+ }
+
+ /// Shorthand for checking that the set of permissions contains the
/// [Use VAD] permission.
///
/// [Use VAD]: constant.USE_VAD.html