[base] Ben heun pas grand chose
[mod-error] Petite réparation d'une petite erreur
This commit is contained in:
parent
493e1ca449
commit
bfe40d3d28
@ -85,9 +85,9 @@ class BaseClass:
|
|||||||
|
|
||||||
:param message: message to parse
|
:param message: message to parse
|
||||||
:type message: discord.Message"""
|
: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):
|
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, args, kwargs = self._parse_command_content(content)
|
||||||
sub_command = "com_" + sub_command
|
sub_command = "com_" + sub_command
|
||||||
if self.auth(message.author):
|
if self.auth(message.author):
|
||||||
|
@ -95,9 +95,10 @@ class MainClass(BaseClassPython):
|
|||||||
await message.add_reaction("🗑️")
|
await message.add_reaction("🗑️")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
reaction, user = await self.client.wait_for('reaction_add', timeout=60.0, check=lambda r,
|
reaction, user = await self.client.wait_for('reaction_add',
|
||||||
u: r.emoji == "🗑️" and not u.bot and self.auth(
|
timeout=60.0,
|
||||||
user))
|
check=lambda r, u:
|
||||||
|
r.emoji == "🗑️" and not u.bot and self.auth(u))
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
await message.delete()
|
await message.delete()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user