Update app.py
Browse files
app.py
CHANGED
@@ -120,14 +120,7 @@ class MyClient(discord.Client):
|
|
120 |
try:
|
121 |
await message.delete()
|
122 |
await asyncio.sleep(5) # safety mechanism, can only delete slowly
|
123 |
-
|
124 |
-
# if the bot has this role, it won't run
|
125 |
-
OFFLINE_ROLE_ID = 1103676632667017266 # 1103676632667017266 = @offline / under maintenance
|
126 |
-
guild = message.guild
|
127 |
-
bot_member = guild.get_member(self.user.id)
|
128 |
-
if any(role.id == OFFLINE_ROLE_ID for role in bot_member.roles):
|
129 |
-
return
|
130 |
-
|
131 |
# the message author needs this role in order to use the bot
|
132 |
REQUIRED_ROLE_ID = 897376942817419265 # 900063512829755413 = @verified, 897376942817419265 = @huggingfolks
|
133 |
if not any(role.id == REQUIRED_ROLE_ID for role in message.author.roles):
|
|
|
120 |
try:
|
121 |
await message.delete()
|
122 |
await asyncio.sleep(5) # safety mechanism, can only delete slowly
|
123 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
# the message author needs this role in order to use the bot
|
125 |
REQUIRED_ROLE_ID = 897376942817419265 # 900063512829755413 = @verified, 897376942817419265 = @huggingfolks
|
126 |
if not any(role.id == REQUIRED_ROLE_ID for role in message.author.roles):
|