aboutsummaryrefslogtreecommitdiff
path: root/src/framework/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/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/command.rs')
-rw-r--r--src/framework/command.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs
index 2aa6bbe..a1c25de 100644
--- a/src/framework/command.rs
+++ b/src/framework/command.rs
@@ -4,7 +4,7 @@ use ::client::Context;
use ::model::{Message, Permissions};
use std::collections::HashMap;
-pub type Check = Fn(&mut Context, &Message) -> bool + Send + Sync + 'static;
+pub type Check = Fn(&mut Context, &Message, &Arc<Command>) -> bool + Send + Sync + 'static;
pub type Exec = Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + Send + Sync + 'static;
pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + Send + Sync + 'static;
pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + Send + Sync + 'static;