mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Makes roundstart webhook not metagame.
This commit is contained in:
16
code/modules/webhooks/webhook_roundstart.dm
Normal file
16
code/modules/webhooks/webhook_roundstart.dm
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/decl/webhook/roundstart
|
||||||
|
id = WEBHOOK_ROUNDSTART
|
||||||
|
|
||||||
|
// Data expects a "url" field pointing to the current hosted server and port to connect on.
|
||||||
|
/decl/webhook/roundstart/get_message(var/list/data)
|
||||||
|
. = ..()
|
||||||
|
var/desc = "Gamemode: **[global.master_mode]**\n"
|
||||||
|
desc += "Players: **[global.player_list.len]**"
|
||||||
|
if(data && data["url"])
|
||||||
|
desc += "\nAddress: <[data["url"]]>"
|
||||||
|
|
||||||
|
.["embeds"] = list(list(
|
||||||
|
"title" = "Round has started.",
|
||||||
|
"description" = desc,
|
||||||
|
"color" = COLOR_WEBHOOK_DEFAULT
|
||||||
|
))
|
||||||
Reference in New Issue
Block a user