diff options
Diffstat (limited to 'examples/07_sample_bot_structure/src/commands/owner.rs')
| -rw-r--r-- | examples/07_sample_bot_structure/src/commands/owner.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/07_sample_bot_structure/src/commands/owner.rs b/examples/07_sample_bot_structure/src/commands/owner.rs new file mode 100644 index 0000000..e80c19d --- /dev/null +++ b/examples/07_sample_bot_structure/src/commands/owner.rs @@ -0,0 +1,10 @@ +command!(quit(ctx, msg, _args) { + match ctx.quit() { + Ok(()) => { + let _ = msg.reply("Shutting down!"); + }, + Err(why) => { + let _ = msg.reply(&format!("Failed to shutdown: {:?}", why)); + }, + } +}); |