aboutsummaryrefslogtreecommitdiff
path: root/src/model/utils.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-11-04 20:06:40 +0100
committeracdenisSK <[email protected]>2017-11-04 20:06:40 +0100
commit0bd519f4ef9784d0fb5663d74db0d567f0bb1ae5 (patch)
treecc2a6f44e97e42420507964dab4662fcccd9beb3 /src/model/utils.rs
parentFix Help-Commands to list all eligible commands in DMs. (#212) (diff)
parentBump to v0.4.3 (diff)
downloadserenity-0bd519f4ef9784d0fb5663d74db0d567f0bb1ae5.tar.xz
serenity-0bd519f4ef9784d0fb5663d74db0d567f0bb1ae5.zip
Merge v0.4.3
Diffstat (limited to 'src/model/utils.rs')
-rw-r--r--src/model/utils.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/model/utils.rs b/src/model/utils.rs
index 62ecc4e..d366e5f 100644
--- a/src/model/utils.rs
+++ b/src/model/utils.rs
@@ -178,7 +178,10 @@ pub fn user_has_perms(channel_id: ChannelId, mut permissions: Permissions) -> Re
None => return Err(Error::Model(ModelError::ItemMissing)),
};
- let perms = guild.read().permissions_for(channel_id, current_user.id);
+ let perms = guild
+ .read()
+ .unwrap()
+ .permissions_in(channel_id, current_user.id);
permissions.remove(perms);