Commit Graph

5 Commits

Author SHA1 Message Date
Pieter-Jan Briers
582a644c24 I have spent more time today cleaning up garbage than coding new shit, and I am mad (#31246)
* Fix logging of GetWebhook errors

Yeah let's just not log the error only stack trace.

* I have spent more time today cleaning up garbage than coding new shit, and I am mad

Cleans up the custom vote Discord webhook code because I *happened* to lay my eyes on how completely terrible it was and immediately found an obvious bug with it.

Also did basic QA because jesus christ: it more clearly reports pending votes, properly indicates cancelled votes, improves footer formatting, better error logging, all the usual shit.

Requires https://github.com/space-wizards/RobustToolbox/pull/5375 to avoid test failures
2024-09-06 20:00:57 +10:00
Pieter-Jan Briers
d63115d1f7 Don't create new JsonSerializerOptions for every discord webhook (#31240)
*sigh*
2024-08-20 23:32:11 +02:00
Jacob
beb86fa0fe Add failure logging to DiscordWebhook.cs (#30835)
* Add failure logging to DiscordWebhook.cs

Add a new function that logs errors with discord webhook's http requests.

Create, Delete, and Edit functions were modified slightly to call the log function but return the same information as before.

The log function logs the error code, caller method using a simple constant (could be better), and attempts to log headers mentioned in issue #30248.

* remove extra ';'

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Move header error logs to debug

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2024-08-20 23:12:30 +02:00
LankLTE
94628d6ab1 Relay custom votes to a webhook (#18561)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-12-14 20:03:32 -08:00
DrSmugleaf
913c80db4a Add round end Discord pings, discord webhook API (#19468) 2023-08-24 16:50:07 -05:00