From feb2ee1eddc92cf02fc9e64534030ae0d374418b Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Sun, 6 Nov 2016 13:18:56 -0800 Subject: Add an 'allow_whitespace' framework config The option allows whitespace to be optional between a mention and a command. Setting it to true will allow the following scenario to occur, while false will not: ``` <@BOT_ID>about // bot process and executes the "about" command if it exists ``` --- examples/06_command_framework.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/06_command_framework.rs') diff --git a/examples/06_command_framework.rs b/examples/06_command_framework.rs index 21b8539..1bd3ffd 100644 --- a/examples/06_command_framework.rs +++ b/examples/06_command_framework.rs @@ -28,6 +28,7 @@ fn main() { client.with_framework(|f| f .configure(|c| c .on_mention(true) + .allow_whitespace(true) .prefix("~")) .on("ping", ping_command) .set_check("ping", owner_check) // Ensure only the owner can run this -- cgit v1.2.3