Changes the discord bot into a subsystem and adds quite a bit of additional logging (#17996)

* Changes the discord bot into a subsystem and adds quite a bit of additional logging

* Removes a forgotten todo

* replaces call with RUSTG_CALL (to make it compile) and adds a comment

* Re-Add log prefix

---------

Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
Werner
2023-12-19 22:54:57 +00:00
committed by GitHub
co-authored by Werner
parent d0ca24467e
commit 3daec39efa
27 changed files with 219 additions and 135 deletions
@@ -187,12 +187,12 @@
panel_notification=1
notification_count++
if("admin")
discord_bot.send_to_admins("Server Notification for [user.ckey]: [query.item[1]]")
SSdiscord.send_to_admins("Server Notification for [user.ckey]: [query.item[1]]")
post_webhook_event(WEBHOOK_ADMIN, list("title"="Server Notification for: [user.ckey]", "message"="Server Notification Triggered for [user.ckey]: [query.item[1]]"))
//Immediately ack the notification
autoack=1
if("ccia")
discord_bot.send_to_cciaa("Server Notification for [user.ckey]: [query.item[1]]")
SSdiscord.send_to_cciaa("Server Notification for [user.ckey]: [query.item[1]]")
post_webhook_event(WEBHOOK_CCIAA_EMERGENCY_MESSAGE, list("title"="Server Notification for: [user.ckey]", "message"="Server Notification Triggered for [user.ckey]: [query.item[1]]"))
//Immeidately ack the notification
autoack=1