Skip to content

Commit

Permalink
Fix: send a valid user-agent when making Discord webhook calls (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Mar 9, 2024
1 parent 370d55c commit 1130038
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/GitHub/protocols/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ async def _send_messages(hook_urls, user, avatar_url, message):
"parse": [],
},
},
headers={
"User-Agent": "DorpsGek (https://github.com/OpenTTD/DorpsGek, 1.0)",
},
)
if resp.status not in (200, 204):
log.error(f"Failed to send message to Discord: {resp.status}")
Expand Down

0 comments on commit 1130038

Please sign in to comment.