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
+2 -2
View File
@@ -175,8 +175,8 @@
msg = sanitize(msg)
sender = sanitize(sender, encode=0)
post_webhook_event(WEBHOOK_ADMIN_PM, list("title"="Help is requested", "message"="PlayerPM to **[discord_escape(sender)]** from **[discord_escape(key_name(src))]**: ```[discord_escape(html_decode(msg))]```"))
discord_bot.send_to_admins("PlayerPM to [discord_escape(sender)] from [discord_escape(key_name(src))]: [discord_escape(html_decode(msg))]")
post_webhook_event(WEBHOOK_ADMIN_PM, list("title"="Help is requested", "message"="PlayerPM to **[SSdiscord.discord_escape(sender)]** from **[SSdiscord.discord_escape(key_name(src))]**: ```[SSdiscord.discord_escape(html_decode(msg))]```"))
SSdiscord.send_to_admins("PlayerPM to [SSdiscord.discord_escape(sender)] from [SSdiscord.discord_escape(key_name(src))]: [SSdiscord.discord_escape(html_decode(msg))]")
to_chat(src, "<span class='pm'><span class='out'>" + create_text_tag("PM <-", src) + " to <span class='name'>Discord-[sender]</span>: <span class='message linkify'>[msg]</span></span></span>")