aboutsummaryrefslogtreecommitdiff
path: root/src/framework/create_command.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-16 22:24:43 +0200
committeracdenisSK <[email protected]>2017-08-16 22:25:30 +0200
commit005437f56869e846ff677b6516605def0c4de7bc (patch)
tree8059c36c4564cafcd6effe086daa4c7ebe6d0218 /src/framework/create_command.rs
parenta little for-loop to iterator change (diff)
downloadserenity-005437f56869e846ff677b6516605def0c4de7bc.tar.xz
serenity-005437f56869e846ff677b6516605def0c4de7bc.zip
Provide the args to the checks
Diffstat (limited to 'src/framework/create_command.rs')
-rw-r--r--src/framework/create_command.rs4
1 files changed, 2 insertions, 2 deletions
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<Command>) -> bool {
+ /// fn owner_check(_context: &mut Context, message: &Message, _: &[String], _: &Arc<Command>) -> bool {
/// // replace with your user ID
/// message.author.id == 7
/// }
/// ```
pub fn check<F>(mut self, check: F) -> Self
- where F: Fn(&mut Context, &Message, &Arc<Command>) -> bool + Send + Sync + 'static {
+ where F: Fn(&mut Context, &Message, &[String], &Arc<Command>) -> bool + Send + Sync + 'static {
self.0.checks.push(Box::new(check));
self