disable notification triggers for now, fix monday
Browse files
app.py
CHANGED
@@ -85,6 +85,7 @@ async def on_message(message):
|
|
85 |
|
86 |
# notification bot
|
87 |
print("on_message")
|
|
|
88 |
huggingfolks_role = discord.utils.get(message.guild.roles, id=897376942817419265)
|
89 |
bots_role = discord.utils.get(message.guild.roles, id=1258328471609016341)
|
90 |
if huggingfolks_role not in message.author.roles: # no need for ping if we're already discussing
|
@@ -103,7 +104,10 @@ async def on_message(message):
|
|
103 |
'trigger': trigger
|
104 |
})
|
105 |
print(f"daily pings:{daily_pings}")
|
106 |
-
break
|
|
|
|
|
|
|
107 |
|
108 |
# Check if the message is in a thread
|
109 |
if isinstance(message.channel, discord.Thread):
|
@@ -239,10 +243,14 @@ def send_daily_pings():
|
|
239 |
|
240 |
# pings -------------------------------------------------------------------------------------------
|
241 |
|
|
|
|
|
242 |
executor = ThreadPoolExecutor(max_workers=1)
|
243 |
scheduler = BackgroundScheduler(executors={'default': executor})
|
244 |
scheduler.add_job(send_daily_pings, trigger='interval', days=1)
|
245 |
scheduler.start()
|
|
|
|
|
246 |
|
247 |
|
248 |
# runs discord bot in thread = helps avoid blocking calls
|
|
|
85 |
|
86 |
# notification bot
|
87 |
print("on_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
|
|
|
104 |
'trigger': trigger
|
105 |
})
|
106 |
print(f"daily pings:{daily_pings}")
|
107 |
+
break
|
108 |
+
|
109 |
+
"""
|
110 |
+
|
111 |
|
112 |
# Check if the message is in a thread
|
113 |
if isinstance(message.channel, discord.Thread):
|
|
|
243 |
|
244 |
# pings -------------------------------------------------------------------------------------------
|
245 |
|
246 |
+
"""
|
247 |
+
|
248 |
executor = ThreadPoolExecutor(max_workers=1)
|
249 |
scheduler = BackgroundScheduler(executors={'default': executor})
|
250 |
scheduler.add_job(send_daily_pings, trigger='interval', days=1)
|
251 |
scheduler.start()
|
252 |
+
"""
|
253 |
+
|
254 |
|
255 |
|
256 |
# runs discord bot in thread = helps avoid blocking calls
|