Skip to content

Commit

Permalink
Add ability to use discord embed color
Browse files Browse the repository at this point in the history
  • Loading branch information
partydragen committed Jun 4, 2022
1 parent d7a30ef commit d4af5fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/Discord Integration/hooks/DiscordHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand Down

0 comments on commit d4af5fe

Please sign in to comment.