aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/standard/mod.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs
index 7e99a0f..b0cebe7 100644
--- a/src/framework/standard/mod.rs
+++ b/src/framework/standard/mod.rs
@@ -1205,8 +1205,9 @@ impl Framework for StandardFramework {
#[cfg(feature = "cache")]
pub fn has_correct_permissions(command: &Arc<CommandOptions>, message: &Message) -> bool {
- if !command.required_permissions.is_empty() {
-
+ if command.required_permissions.is_empty() {
+ true
+ } else {
if let Some(guild) = message.guild() {
let perms = guild
.with(|g| g.permissions_in(message.channel_id, message.author.id));
@@ -1215,8 +1216,6 @@ pub fn has_correct_permissions(command: &Arc<CommandOptions>, message: &Message)
} else {
false
}
- } else {
- true
}
}