aboutsummaryrefslogtreecommitdiff
path: root/examples/08_sample_bot_structure/src/commands/math.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/08_sample_bot_structure/src/commands/math.rs')
-rw-r--r--examples/08_sample_bot_structure/src/commands/math.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/08_sample_bot_structure/src/commands/math.rs b/examples/08_sample_bot_structure/src/commands/math.rs
new file mode 100644
index 0000000..79bfc52
--- /dev/null
+++ b/examples/08_sample_bot_structure/src/commands/math.rs
@@ -0,0 +1,5 @@
+command!(multiply(_ctx, msg, _args, one: f64, two: f64) {
+ let product = one * two;
+
+ let _ = msg.channel_id.say(&product.to_string());
+});