Skip to content

Commit

Permalink
Fix framework before check
Browse files Browse the repository at this point in the history
The framework would ignore the `before` function if the command was not
ran by an owner. Instead, flip the conditions so that it's always run,
and then the result is succeeded by an owner check.
  • Loading branch information
Austin Hellyer committed Dec 18, 2016
1 parent a2cbeb6 commit 760a47a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ext/framework/mod.rs
Expand Up @@ -503,7 +503,7 @@ impl Framework {

thread::spawn(move || {
if let Some(before) = before {
if !is_owner && !(before)(&context, &message, &built) {
if !(before)(&context, &message, &built) && !is_owner {
return;
}
}
Expand Down

0 comments on commit 760a47a

Please sign in to comment.