mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 11:31:51 +00:00
Ports Nebula's Discord Webhook Integration (#8071)
* Ports Nebula's Discord Webhook Integration * Forgot the example .json file.
This commit is contained in:
@@ -1626,6 +1626,19 @@ datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies
|
||||
for(var/client/C in 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