adragos commited on
Commit
a539c43
·
1 Parent(s): 6c226fa

hotfix: fix webhook

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -199,12 +199,12 @@ def summary(webhook_url, disable_discord, env, username, state):
199
  if len(word) + 1 + len(chunk) < 2000:
200
  chunk += word + " "
201
  else:
202
- r = requests.post(discord_webhook_url_hard, json={"content": chunk, "allowed_mentions": {"parse": []}})
203
  r.raise_for_status()
204
  chunk = ""
205
- if chunk:
206
- r = requests.post(discord_webhook_url_hard, json={"content": chunk, "allowed_mentions": {"parse": []}})
207
- r.raise_for_status()
208
  except Exception:
209
  return "Error: webhook discord failed"
210
  elif env == Env.CHALLENGE_HARD:
 
199
  if len(word) + 1 + len(chunk) < 2000:
200
  chunk += word + " "
201
  else:
202
+ r = requests.post(webhook_url, json={"content": chunk, "allowed_mentions": {"parse": []}})
203
  r.raise_for_status()
204
  chunk = ""
205
+ if chunk:
206
+ r = requests.post(webhook_url, json={"content": chunk, "allowed_mentions": {"parse": []}})
207
+ r.raise_for_status()
208
  except Exception:
209
  return "Error: webhook discord failed"
210
  elif env == Env.CHALLENGE_HARD: