aboutsummaryrefslogtreecommitdiff
path: root/examples/07_sample_bot_structure/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/07_sample_bot_structure/src')
-rw-r--r--examples/07_sample_bot_structure/src/commands/math.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/07_sample_bot_structure/src/commands/math.rs b/examples/07_sample_bot_structure/src/commands/math.rs
index 2b1c1d2..3aaccc4 100644
--- a/examples/07_sample_bot_structure/src/commands/math.rs
+++ b/examples/07_sample_bot_structure/src/commands/math.rs
@@ -1,4 +1,7 @@
-command!(multiply(_ctx, msg, _args, one: f64, two: f64) {
+command!(multiply(_ctx, msg, args) {
+ let one = args.single::<f64>().unwrap();
+ let two = args.single::<f64>().unwrap();
+
let product = one * two;
let _ = msg.channel_id.say(product);