From 005437f56869e846ff677b6516605def0c4de7bc Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Wed, 16 Aug 2017 22:24:43 +0200 Subject: Provide the args to the checks --- src/framework/create_command.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/framework/create_command.rs') diff --git a/src/framework/create_command.rs b/src/framework/create_command.rs index 495fdd6..cf78174 100644 --- a/src/framework/create_command.rs +++ b/src/framework/create_command.rs @@ -57,13 +57,13 @@ impl CreateCommand { /// Ok(()) /// } /// - /// fn owner_check(_context: &mut Context, message: &Message, _: &Arc) -> bool { + /// fn owner_check(_context: &mut Context, message: &Message, _: &[String], _: &Arc) -> bool { /// // replace with your user ID /// message.author.id == 7 /// } /// ``` pub fn check(mut self, check: F) -> Self - where F: Fn(&mut Context, &Message, &Arc) -> bool + Send + Sync + 'static { + where F: Fn(&mut Context, &Message, &[String], &Arc) -> bool + Send + Sync + 'static { self.0.checks.push(Box::new(check)); self -- cgit v1.2.3