Update app.py
Browse files
app.py
CHANGED
@@ -86,10 +86,16 @@ class MyClient(discord.Client):
|
|
86 |
|
87 |
guild = 879548962464493619
|
88 |
OFFLINE_ROLE_ID = 1103676632667017266
|
|
|
|
|
89 |
bot_member = guild.get_member(self.user.id)
|
90 |
|
91 |
if any(role.id == OFFLINE_ROLE_ID for role in bot_member.roles):
|
92 |
return
|
|
|
|
|
|
|
|
|
93 |
|
94 |
async def on_ready(self):
|
95 |
print('Logged on as', self.user)
|
@@ -122,14 +128,10 @@ class MyClient(discord.Client):
|
|
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 |
-
|
126 |
-
if not any(role.id == REQUIRED_ROLE_ID for role in message.author.roles):
|
127 |
-
return
|
128 |
|
129 |
# channels where bot will accept commands
|
130 |
-
|
131 |
-
if message.channel.id not in ALLOWED_CHANNEL_IDS:
|
132 |
-
return
|
133 |
|
134 |
#deepfloydif----------------------------------------------------------------------------------------------------
|
135 |
|
|
|
86 |
|
87 |
guild = 879548962464493619
|
88 |
OFFLINE_ROLE_ID = 1103676632667017266
|
89 |
+
REQUIRED_ROLE_ID = 897376942817419265 # 900063512829755413 = @verified, 897376942817419265 = @huggingfolks
|
90 |
+
ALLOWED_CHANNEL_IDS = [1100458786826747945] # 1100458786826747945 = #bot-test
|
91 |
bot_member = guild.get_member(self.user.id)
|
92 |
|
93 |
if any(role.id == OFFLINE_ROLE_ID for role in bot_member.roles):
|
94 |
return
|
95 |
+
if not any(role.id == REQUIRED_ROLE_ID for role in message.author.roles):
|
96 |
+
return
|
97 |
+
if message.channel.id not in ALLOWED_CHANNEL_IDS:
|
98 |
+
return
|
99 |
|
100 |
async def on_ready(self):
|
101 |
print('Logged on as', self.user)
|
|
|
128 |
await asyncio.sleep(5) # safety mechanism, can only delete slowly
|
129 |
|
130 |
# the message author needs this role in order to use the bot
|
131 |
+
|
|
|
|
|
132 |
|
133 |
# channels where bot will accept commands
|
134 |
+
|
|
|
|
|
135 |
|
136 |
#deepfloydif----------------------------------------------------------------------------------------------------
|
137 |
|