diff options
Diffstat (limited to 'azalea/examples/testbot/commands/debug.rs')
| -rw-r--r-- | azalea/examples/testbot/commands/debug.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/azalea/examples/testbot/commands/debug.rs b/azalea/examples/testbot/commands/debug.rs index 12f6d362..cd487abb 100644 --- a/azalea/examples/testbot/commands/debug.rs +++ b/azalea/examples/testbot/commands/debug.rs @@ -29,6 +29,14 @@ pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) { source.reply("pong!"); 1 })); + commands.register( + literal("say").then(argument("message", greedy_string()).executes(|ctx: &Ctx| { + let source = ctx.source.lock(); + let message = get_string(ctx, "message").unwrap(); + source.bot.chat(message); + 1 + })), + ); commands.register(literal("disconnect").executes(|ctx: &Ctx| { let source = ctx.source.lock(); |
