Spaces:
Paused
Paused
hotfix: prevent pings
Browse files
app.py
CHANGED
@@ -188,14 +188,14 @@ def summary(webhook_url, disable_discord, env, username, state):
|
|
188 |
webhook_url = webhook_url or discord_webhook_url_public
|
189 |
|
190 |
try:
|
191 |
-
r = requests.post(webhook_url, json={"content": summary})
|
192 |
r.raise_for_status()
|
193 |
except Exception as e:
|
194 |
return f"Error: {e}"
|
195 |
elif env == Env.CHALLENGE_EASY:
|
196 |
webhook_url = discord_webhook_url_easy
|
197 |
try:
|
198 |
-
r = requests.post(webhook_url, json={"content": summary})
|
199 |
r.raise_for_status()
|
200 |
except Exception as e:
|
201 |
return f"Error: {e}"
|
@@ -293,7 +293,7 @@ def run_summary_hard():
|
|
293 |
db.close()
|
294 |
|
295 |
try:
|
296 |
-
r = requests.post(discord_webhook_url_hard, json={"content": summary})
|
297 |
r.raise_for_status()
|
298 |
except Exception as e:
|
299 |
return f"Error: {e}"
|
|
|
188 |
webhook_url = webhook_url or discord_webhook_url_public
|
189 |
|
190 |
try:
|
191 |
+
r = requests.post(webhook_url, json={"content": summary, "allowed_mentions": {"parse": []}})
|
192 |
r.raise_for_status()
|
193 |
except Exception as e:
|
194 |
return f"Error: {e}"
|
195 |
elif env == Env.CHALLENGE_EASY:
|
196 |
webhook_url = discord_webhook_url_easy
|
197 |
try:
|
198 |
+
r = requests.post(webhook_url, json={"content": summary, "allowed_mentions": {"parse": []}})
|
199 |
r.raise_for_status()
|
200 |
except Exception as e:
|
201 |
return f"Error: {e}"
|
|
|
293 |
db.close()
|
294 |
|
295 |
try:
|
296 |
+
r = requests.post(discord_webhook_url_hard, json={"content": summary, "allowed_mentions": {"parse": []}})
|
297 |
r.raise_for_status()
|
298 |
except Exception as e:
|
299 |
return f"Error: {e}"
|