From 5ad4ec5ee11e2e5685e6467a8b2eacefb5870bf4 Mon Sep 17 00:00:00 2001 From: Conatum Date: Sun, 24 Oct 2021 20:12:28 +0300 Subject: [PATCH] fix (send cmd): Harden arg parsing. Fix an issue where the send arg parsing would pass non-matching input. --- bot/modules/economy/send_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/modules/economy/send_cmd.py b/bot/modules/economy/send_cmd.py index cf5ebd64..5086ee67 100644 --- a/bot/modules/economy/send_cmd.py +++ b/bot/modules/economy/send_cmd.py @@ -26,7 +26,7 @@ async def cmd_send(ctx): # Extract target and amount # Handle a slightly more flexible input than stated splits = ctx.args.split() - digits = [split.isdigit() for split in splits] + digits = [split.isdigit() for split in splits[:2]] mentions = ctx.msg.mentions if len(splits) < 2 or not any(digits) or not (all(digits) or mentions): return await _send_usage(ctx)