From bfe40d3d289aba6cbe48f1eee8af8a111c60f7cb Mon Sep 17 00:00:00 2001 From: Louis Chauvet Date: Thu, 9 Apr 2020 12:02:03 +0200 Subject: [PATCH] =?UTF-8?q?[base]=20Ben=20heun=20pas=20grand=20chose=20[mo?= =?UTF-8?q?d-error]=20Petite=20r=C3=A9paration=20d'une=20petite=20erreur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/base/Base.py | 4 ++-- modules/errors/__init__.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/base/Base.py b/modules/base/Base.py index c4c0fbf..406757c 100644 --- a/modules/base/Base.py +++ b/modules/base/Base.py @@ -85,9 +85,9 @@ class BaseClass: :param message: message to parse :type message: discord.Message""" - command = self.client.config["prefix"] + (self.config.command_text if self.config.command_text else "") + " " + command = self.client.config["prefix"] + (self.config.command_text if self.config.command_text else "") if message.content.startswith(command): - content = message.content.split(" ", 1)[1] + content = message.content.split(" ", 1)[1 if " " in message.content else 0] sub_command, args, kwargs = self._parse_command_content(content) sub_command = "com_" + sub_command if self.auth(message.author): diff --git a/modules/errors/__init__.py b/modules/errors/__init__.py index 847b17c..3a6c8b2 100644 --- a/modules/errors/__init__.py +++ b/modules/errors/__init__.py @@ -95,9 +95,10 @@ class MainClass(BaseClassPython): await message.add_reaction("🗑️") try: - reaction, user = await self.client.wait_for('reaction_add', timeout=60.0, check=lambda r, - u: r.emoji == "🗑️" and not u.bot and self.auth( - user)) + reaction, user = await self.client.wait_for('reaction_add', + timeout=60.0, + check=lambda r, u: + r.emoji == "🗑️" and not u.bot and self.auth(u)) except asyncio.TimeoutError: await message.delete() else: