diff options
| author | acdenisSK <[email protected]> | 2017-08-18 00:53:20 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-18 00:53:20 +0200 |
| commit | 106a4d5f8ff22a829a9486ce88fa8326184828fa (patch) | |
| tree | 650c539ce1fac58f07f568077a6c396b54cc9027 /src/framework/command.rs | |
| parent | Fix args when `use_quotes` is true (diff) | |
| download | serenity-106a4d5f8ff22a829a9486ce88fa8326184828fa.tar.xz serenity-106a4d5f8ff22a829a9486ce88fa8326184828fa.zip | |
Allow the user to be given the original message (as in, the message used to construct the `args`)
Diffstat (limited to 'src/framework/command.rs')
| -rw-r--r-- | src/framework/command.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/framework/command.rs b/src/framework/command.rs index 74afb0d..ed38a14 100644 --- a/src/framework/command.rs +++ b/src/framework/command.rs @@ -5,7 +5,7 @@ use model::{Message, Permissions}; use std::collections::HashMap; pub type Check = Fn(&mut Context, &Message, &[String], &Arc<Command>) -> bool + 'static; -pub type Exec = Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + 'static; +pub type Exec = Fn(&mut Context, &Message, Vec<String>, String) -> Result<(), String> + 'static; pub type Help = Fn(&mut Context, &Message, HashMap<String, Arc<CommandGroup>>, &[String]) -> Result<(), String> + 'static; @@ -69,7 +69,7 @@ pub struct Command { impl Command { pub fn new<F>(f: F) -> Self - where F: Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + 'static { + where F: Fn(&mut Context, &Message, Vec<String>, String) -> Result<(), String> + 'static { Command { aliases: Vec::new(), checks: Vec::default(), |