diff options
| author | Austin Hellyer <[email protected]> | 2016-12-18 07:19:05 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-18 10:16:17 -0800 |
| commit | 760a47aa4d34160f44048e775afeb30f08891c99 (patch) | |
| tree | ab741b8eb311be304799f294454bf2b7f7fb4301 | |
| parent | Expose message webhook Ids (diff) | |
| download | serenity-760a47aa4d34160f44048e775afeb30f08891c99.tar.xz serenity-760a47aa4d34160f44048e775afeb30f08891c99.zip | |
Fix framework before check
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.
| -rw-r--r-- | src/ext/framework/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index a961897..fb8c05c 100644 --- a/src/ext/framework/mod.rs +++ b/src/ext/framework/mod.rs @@ -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; } } |