diff options
Diffstat (limited to 'examples/06_command_framework/src')
| -rw-r--r-- | examples/06_command_framework/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/06_command_framework/src/main.rs b/examples/06_command_framework/src/main.rs index 4aeafe1..35a6994 100644 --- a/examples/06_command_framework/src/main.rs +++ b/examples/06_command_framework/src/main.rs @@ -81,9 +81,9 @@ fn main() { let entry = counter.entry(command_name.clone()).or_insert(0); *entry += 1; - true + true // if `before` returns false, command processing doesn't happen. }) - // Very similar to `before`, except this will be called directly _after_ + // Similar to `before`, except will be called directly _after_ // command execution. .after(|_, _, command_name, error| { match error { @@ -153,7 +153,7 @@ command!(commands(context, _msg, _args) { // In this case, this command checks to ensure you are the owner of the message // in order for the command to be executed. If the check fails, the command is // not called. -fn owner_check(_: &Context, message: &Message) -> bool { +fn owner_check(_: &mut Context, message: &Message) -> bool { // Replace 7 with your ID message.author.id == 7 } |