users with bot role no longer trigger pings
Browse files
app.py
CHANGED
@@ -53,12 +53,14 @@ async def on_message(message):
|
|
53 |
|
54 |
# notification bot
|
55 |
huggingfolks_role = discord.utils.get(message.guild.roles, id=897376942817419265)
|
|
|
56 |
if huggingfolks_role not in message.author.roles: # no need for ping if we're already discussing
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
62 |
|
63 |
# ask-for-help
|
64 |
# discord.ForumChannel.last_message_id -> The last thread ID that was created on this forum.
|
|
|
53 |
|
54 |
# notification bot
|
55 |
huggingfolks_role = discord.utils.get(message.guild.roles, id=897376942817419265)
|
56 |
+
bots_role = discord.utils.get(message.guild.roles, id=1258328471609016341)
|
57 |
if huggingfolks_role not in message.author.roles: # no need for ping if we're already discussing
|
58 |
+
if bots_role not in message.author.roles: # bots shouldn't trigger pings for this
|
59 |
+
content = message.content.lower()
|
60 |
+
for trigger, slack_mention in TRIGGERS.items():
|
61 |
+
if trigger in content:
|
62 |
+
await post_to_slack(message.author, message.content, message.channel.name, message.jump_url, slack_mention, trigger)
|
63 |
+
break
|
64 |
|
65 |
# ask-for-help
|
66 |
# discord.ForumChannel.last_message_id -> The last thread ID that was created on this forum.
|