aboutsummaryrefslogtreecommitdiff
path: root/src/framework
diff options
context:
space:
mode:
authorLakelezz <[email protected]>2017-08-17 10:07:39 +0200
committeralex <[email protected]>2017-08-17 10:07:39 +0200
commitfc9eba3d6d6a600f7d45a6f4e5918aae1191819d (patch)
tree156e8d87f30ab16825e114f66f5f6cb58db8e214 /src/framework
parentReword this (diff)
downloadserenity-fc9eba3d6d6a600f7d45a6f4e5918aae1191819d.tar.xz
serenity-fc9eba3d6d6a600f7d45a6f4e5918aae1191819d.zip
Expande CheckFailed to provide Arc<Command>(#138)
Diffstat (limited to 'src/framework')
-rw-r--r--src/framework/mod.rs4
1 files changed, 2 insertions, 2 deletions
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<Command>),
/// 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) {