From eb47559fa00c13c8fdc8f40a8fe3d06690c0570c Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Thu, 13 Jul 2017 23:09:22 +0200 Subject: 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. --- src/framework/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/framework/command.rs') 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) -> bool + Send + Sync + 'static; pub type Exec = Fn(&mut Context, &Message, Vec) -> Result<(), String> + Send + Sync + 'static; pub type Help = Fn(&mut Context, &Message, HashMap>, &[String]) -> Result<(), String> + Send + Sync + 'static; pub type BeforeHook = Fn(&mut Context, &Message, &String) -> bool + Send + Sync + 'static; -- cgit v1.2.3