diff options
| author | Taavi <[email protected]> | 2017-01-02 03:38:36 +0300 |
|---|---|---|
| committer | zeyla <[email protected]> | 2017-01-01 16:38:36 -0800 |
| commit | 18cc152769a35cd1705f045b9815cc90446034ef (patch) | |
| tree | b33d18158b62ad5d89cd35f4f547aadb509369e2 /src/ext/framework/create_group.rs | |
| parent | Fix command macro signatures (diff) | |
| download | serenity-18cc152769a35cd1705f045b9815cc90446034ef.tar.xz serenity-18cc152769a35cd1705f045b9815cc90446034ef.zip | |
Implement context message queueing
Also the dreaded `ctx <<= "something"` which is actually a mistake.
Diffstat (limited to 'src/ext/framework/create_group.rs')
| -rw-r--r-- | src/ext/framework/create_group.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ext/framework/create_group.rs b/src/ext/framework/create_group.rs index 465224d..03fc33e 100644 --- a/src/ext/framework/create_group.rs +++ b/src/ext/framework/create_group.rs @@ -21,7 +21,7 @@ pub struct CreateGroup(pub CommandGroup); /// framework.group("Information", |g| g /// .prefix("info") /// .command("name", |c| c -/// .exec_str("meew0"))) +/// .exec_str("Hakase"))) /// ``` impl CreateGroup { /// Adds a command to group. @@ -45,7 +45,7 @@ impl CreateGroup { /// Adds a command to group with simplified API. /// You can return Err(string) if there's an error. pub fn on<F>(mut self, command_name: &str, f: F) -> Self - where F: Fn(&Context, &Message, Vec<String>) -> Result<(), String> + Send + Sync + 'static { + where F: Fn(&mut Context, &Message, Vec<String>) -> Result<(), String> + Send + Sync + 'static { let cmd = Arc::new(Command::new(f)); self.0.commands.insert(command_name.to_owned(), CommandOrAlias::Command(cmd)); |