mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] Ports Nebula's Discord Webhook Integration
This commit is contained in:
13
code/modules/webhooks/webhook_ahelp2discord.dm
Normal file
13
code/modules/webhooks/webhook_ahelp2discord.dm
Normal file
@@ -0,0 +1,13 @@
|
||||
/decl/webhook/ahelp_sent
|
||||
id = WEBHOOK_AHELP_SENT
|
||||
|
||||
/decl/webhook/ahelp_sent/get_message(var/list/data)
|
||||
.= ..()
|
||||
.["embeds"] = list(list(
|
||||
"title" = "[data["name"]]",
|
||||
"description" = data["body"],
|
||||
"color" = data["color"] || COLOR_WEBHOOK_DEFAULT
|
||||
))
|
||||
|
||||
/decl/webhook/ahelp_sent/get_mentions()
|
||||
. = !length(GLOB.admins) && ..() // VOREStation Edit - GLOB admins
|
||||
Reference in New Issue
Block a user