From d4af5fed73ecad1d8fbf2aa9b455e3041258ca40 Mon Sep 17 00:00:00 2001 From: Partydragen Date: Sat, 4 Jun 2022 15:22:26 +0200 Subject: [PATCH] Add ability to use discord embed color --- modules/Discord Integration/hooks/DiscordHook.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/Discord Integration/hooks/DiscordHook.php b/modules/Discord Integration/hooks/DiscordHook.php index e6818854f9..961e60f7cd 100644 --- a/modules/Discord Integration/hooks/DiscordHook.php +++ b/modules/Discord Integration/hooks/DiscordHook.php @@ -39,6 +39,10 @@ public static function execute(array $params = []): void { ]]; } + if (isset($params['color'])) { + $return['embeds'][0]['color'] = hexdec($params['color']); + } + $json = json_encode($return, JSON_UNESCAPED_SLASHES); $httpClient = HttpClient::post($params['webhook'], $json, [