[base] Ben heun pas grand chose

[mod-error] Petite réparation d'une petite erreur
This commit is contained in:
Louis Chauvet 2020-04-09 12:02:03 +02:00
parent 493e1ca449
commit bfe40d3d28
Signed by: fomys
GPG Key ID: 1ECA046A9615ABA0
2 changed files with 6 additions and 5 deletions

View File

@ -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):

View File

@ -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: