From 760a47aa4d34160f44048e775afeb30f08891c99 Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Sun, 18 Dec 2016 07:19:05 -0800 Subject: [PATCH] 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. --- src/ext/framework/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ext/framework/mod.rs b/src/ext/framework/mod.rs index a96189790ac..fb8c05cab08 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; } }