Skip to content

Commit

Permalink
Expande CheckFailed to provide Arc<Command>(#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakelezz authored and arqunis committed Aug 17, 2017
1 parent 4ac971d commit fc9eba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fc9eba3

Please sign in to comment.