diff options
| author | Maiddog <[email protected]> | 2017-08-27 17:54:16 -0500 |
|---|---|---|
| committer | alex <[email protected]> | 2017-08-28 00:54:16 +0200 |
| commit | 4e360cf86a74051e2d4f98758c65ae29b97b7b8b (patch) | |
| tree | 6f2a02381b507432b089dbdeeabeb89ff496efe8 /examples/07_sample_bot_structure/src | |
| parent | Prevent malformed opus data from crashing the bot process (#149) (diff) | |
| download | serenity-4e360cf86a74051e2d4f98758c65ae29b97b7b8b.tar.xz serenity-4e360cf86a74051e2d4f98758c65ae29b97b7b8b.zip | |
Fix examples (#151)
Diffstat (limited to 'examples/07_sample_bot_structure/src')
| -rw-r--r-- | examples/07_sample_bot_structure/src/commands/math.rs | 5 |
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); |