aboutsummaryrefslogtreecommitdiff
path: root/src/framework/create_command.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-07-13 23:09:22 +0200
committeracdenisSK <[email protected]>2017-07-13 23:09:22 +0200
commiteb47559fa00c13c8fdc8f40a8fe3d06690c0570c (patch)
tree6fa002b4f2c272309899e7912e2a18c5646e3040 /src/framework/create_command.rs
parentImprove `BanOptions` to be more efficient and remove uneccessary `Read` imports (diff)
downloadserenity-eb47559fa00c13c8fdc8f40a8fe3d06690c0570c.tar.xz
serenity-eb47559fa00c13c8fdc8f40a8fe3d06690c0570c.zip
Provide the command into the checks
Although in the future, this will be changed to just bits of data of an actual command that wouldn't collide with the framework's code, but would still be useful for a check to use.
Diffstat (limited to 'src/framework/create_command.rs')
-rw-r--r--src/framework/create_command.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs
index abed3ea..804b7c3 100644
--- a/src/framework/create_command.rs
+++ b/src/framework/create_command.rs
@@ -62,7 +62,7 @@ impl CreateCommand {
/// }
/// ```
pub fn check<F>(mut self, check: F) -> Self
- where F: Fn(&mut Context, &Message) -> bool + Send + Sync + 'static {
+ where F: Fn(&mut Context, &Message, &Arc<Command>) -> bool + Send + Sync + 'static {
self.0.checks.push(Box::new(check));
self