diff options
| author | Lakelezz <[email protected]> | 2018-10-11 02:19:18 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-11 02:19:18 +0200 |
| commit | e32f9b57d22c37a3238e83d086694304eb6c0cd5 (patch) | |
| tree | 12aaeab3632cc9a828d8b0672c8a662b5ee36116 /src/framework/standard/mod.rs | |
| parent | Add `travis_wait` to extend build-time. (diff) | |
| download | serenity-e32f9b57d22c37a3238e83d086694304eb6c0cd5.tar.xz serenity-e32f9b57d22c37a3238e83d086694304eb6c0cd5.zip | |
Fix Default Command to inherit Group-Options (#412)
Diffstat (limited to 'src/framework/standard/mod.rs')
| -rw-r--r-- | src/framework/standard/mod.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/framework/standard/mod.rs b/src/framework/standard/mod.rs index b0cebe7..099da4e 100644 --- a/src/framework/standard/mod.rs +++ b/src/framework/standard/mod.rs @@ -1160,6 +1160,21 @@ impl Framework for StandardFramework { Args::new(&orginal_round[longest_matching_prefix_len..], &self.configuration.delimiters) }; + if let Some(error) = self.should_fail( + &mut context, + &message, + &command.options(), + &group, + &mut args, + &to_check, + &built, + ) { + if let Some(ref handler) = self.dispatch_error_handler { + handler(context, message, error); + } + return; + } + threadpool.execute(move || { if let Some(before) = before { if !(before)(&mut context, &message, &args.full()) { |