From fc9eba3d6d6a600f7d45a6f4e5918aae1191819d Mon Sep 17 00:00:00 2001 From: Lakelezz <12222135+Lakelezz@users.noreply.github.com> Date: Thu, 17 Aug 2017 10:07:39 +0200 Subject: Expande CheckFailed to provide Arc(#138) --- src/framework/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/framework') diff --git a/src/framework/mod.rs b/src/framework/mod.rs index 0c95e0e..3c89649 100644 --- a/src/framework/mod.rs +++ b/src/framework/mod.rs @@ -179,7 +179,7 @@ macro_rules! command { /// be executed. pub enum DispatchError { /// When a custom function check has failed. - CheckFailed, + CheckFailed(Arc), /// When the requested command is disabled in bot configuration. CommandDisabled(String), /// When the user is blocked in bot configuration. @@ -587,7 +587,7 @@ impl BuiltinFramework { .checks .iter() .all(|check| (check)(&mut context, message, args, command)) { - Some(DispatchError::CheckFailed) + Some(DispatchError::CheckFailed(command.to_owned())) } else if self.configuration .blocked_users .contains(&message.author.id) { -- cgit v1.2.3