Added authentification (users and roles) to remove error messages early
This commit is contained in:
parent
fd3bef9240
commit
cc4704c90c
@ -10,6 +10,8 @@ from modules.base import BaseClassPython
|
|||||||
|
|
||||||
class MainClass(BaseClassPython):
|
class MainClass(BaseClassPython):
|
||||||
name = "errors"
|
name = "errors"
|
||||||
|
authorized_users = []
|
||||||
|
authorized_roles = []
|
||||||
help = {
|
help = {
|
||||||
"description": "Montre toutes les erreurs du bot dans discord.",
|
"description": "Montre toutes les erreurs du bot dans discord.",
|
||||||
"commands": {
|
"commands": {
|
||||||
@ -93,7 +95,7 @@ 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, 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:
|
except asyncio.TimeoutError:
|
||||||
await message.delete()
|
await message.delete()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user