From 048eab9a3ab98c37750616442feb127493039ec5 Mon Sep 17 00:00:00 2001 From: lauralani Date: Mon, 1 Jan 2024 18:18:25 +0100 Subject: [PATCH] change status message if invalid number of arguments --- app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 5312113..010f33f 100644 --- a/app.py +++ b/app.py @@ -98,7 +98,13 @@ async def on_message(message): await message.channel.send(f"Sorry {message.author.mention}, that didn't work. Ping @lauralani") if command == "status": - if len(messagearray) != 2: + if len(messagearray) < 2: + logger.error( + f"Status with no arguments by {message.author.name}. Command: \"{message.content}\"") + await message.add_reaction("❌") + await message.channel.send(f"{message.author.name}: This comand is for checking the status of a single game!\nDid you maybe mean to use the `info` command to display all games?") + return + if len(messagearray) > 2: logger.error( f"Status with invalid numer of arguments by {message.author.name}. Command: \"{message.content}\"") await message.add_reaction("❌")