change status message if invalid number of arguments
This commit is contained in:
parent
a308436410
commit
048eab9a3a
1 changed files with 7 additions and 1 deletions
8
app.py
8
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("❌")
|
||||
|
|
Loading…
Reference in a new issue