Added authentification (users and roles) to remove error messages early

This commit is contained in:
Le Codex 2020-04-05 18:39:29 +02:00
parent fd3bef9240
commit cc4704c90c

View File

@ -10,6 +10,8 @@ from modules.base import BaseClassPython
class MainClass(BaseClassPython):
name = "errors"
authorized_users = []
authorized_roles = []
help = {
"description": "Montre toutes les erreurs du bot dans discord.",
"commands": {
@ -93,7 +95,7 @@ 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)
reaction, user = await self.client.wait_for('reaction_add', timeout=60.0, check=lambda r, u: r.emoji == "🗑️" and not u.bot and await self.auth(user))
except asyncio.TimeoutError:
await message.delete()
else: