fix args
This commit is contained in:
parent
a65137307b
commit
8e4ecbb7c0
5
bot.py
5
bot.py
@ -72,10 +72,11 @@ class BotClient(discord.Client):
|
||||
return message.content.startswith("%")
|
||||
|
||||
async def on_command(self, message: discord.Message):
|
||||
command = message.content.split(" ")[0]
|
||||
parts = message.split(" ")
|
||||
command = message.split(" ")[0]
|
||||
match command:
|
||||
case "%calc":
|
||||
reply = await self._calculate(command[1:])
|
||||
reply = await self._calculate(parts[1:])
|
||||
await message.reply(content=reply)
|
||||
case _:
|
||||
_log.info(f"Unrecognised command {command}")
|
||||
|
Loading…
Reference in New Issue
Block a user