mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #2056 from CHOMPStationBot/upstream-merge-10316
[MIRROR] [MIRROR] Ports Nebula's Discord Webhook Integration
This commit is contained in:
@@ -1632,6 +1632,19 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies
|
||||
for(var/client/C in GLOB.admins)
|
||||
if((R_ADMIN | R_MOD | R_EVENT) & C.holder.rights)
|
||||
to_chat(C, "<span class='log_message'><span class='prefix'>FAX LOG:</span>[key_name_admin(src.owner)] has sent a fax message to [destination.department] (<a href='?_src_=holder;AdminFaxView=\ref[rcvdcopy]'>VIEW</a>)</span>")
|
||||
|
||||
var/plaintext_title = P.sender ? "replied to [key_name(P.sender)]'s fax" : "sent a fax message to [destination.department]"
|
||||
var/fax_text = paper_html_to_plaintext(P.info)
|
||||
log_game(plaintext_title)
|
||||
log_game(fax_text)
|
||||
|
||||
SSwebhooks.send(
|
||||
WEBHOOK_FAX_SENT,
|
||||
list(
|
||||
"name" = "[key_name(owner)] [plaintext_title].",
|
||||
"body" = fax_text
|
||||
)
|
||||
)
|
||||
|
||||
else
|
||||
to_chat(src.owner, "<span class='warning'>Message reply failed.</span>")
|
||||
|
||||
Reference in New Issue
Block a user