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