Skip to content

Commit

Permalink
More fumbling with Discord API
Browse files Browse the repository at this point in the history
  • Loading branch information
raykrueger committed Sep 22, 2024
1 parent cf800cd commit fba69db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 7 additions & 6 deletions resources/functions/discord/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ def post(event):
),
)
return {
"statusCode": 200,
"statusCode": 202,
"headers": {"Content-Type": "application/json"},
"body": json.dumps(
{
"type": 5,
}
),
#
#"body": json.dumps(
# {
# "type": 5,
# }
#),
}
else:
return go_away()
Expand Down
3 changes: 3 additions & 0 deletions resources/functions/discord/discord_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ def handle(event, context):
}

res = requests.post(url, json=body, headers=headers)
if not res.ok:
print(f"ERROR: {res.text}")

res.raise_for_status()

0 comments on commit fba69db

Please sign in to comment.