remove huggingfolks for testing
Browse files
app.py
CHANGED
@@ -88,24 +88,24 @@ async def on_message(message):
|
|
88 |
|
89 |
huggingfolks_role = discord.utils.get(message.guild.roles, id=897376942817419265)
|
90 |
bots_role = discord.utils.get(message.guild.roles, id=1258328471609016341)
|
91 |
-
if huggingfolks_role not in message.author.roles: # no need for ping if we're already discussing
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
|
111 |
|
|
|
88 |
|
89 |
huggingfolks_role = discord.utils.get(message.guild.roles, id=897376942817419265)
|
90 |
bots_role = discord.utils.get(message.guild.roles, id=1258328471609016341)
|
91 |
+
#if huggingfolks_role not in message.author.roles: # no need for ping if we're already discussing
|
92 |
+
if bots_role not in message.author.roles: # bots shouldn't trigger pings for this
|
93 |
+
print(" not bot ")
|
94 |
+
content = message.content.lower()
|
95 |
+
|
96 |
+
for trigger, slack_mention in TRIGGERS.items():
|
97 |
+
if all(word in content for word in trigger):
|
98 |
+
adjacent_words = extract_adjacent_words(message.content, trigger, 3)
|
99 |
+
daily_pings.append({
|
100 |
+
'author': str(message.author),
|
101 |
+
'content': adjacent_words,
|
102 |
+
'channel': message.channel.name,
|
103 |
+
'url': message.jump_url,
|
104 |
+
'mention': slack_mention,
|
105 |
+
'trigger': trigger
|
106 |
+
})
|
107 |
+
print(f"daily pings:{daily_pings}")
|
108 |
+
break
|
109 |
|
110 |
|
111 |
|