Check for discord webhook global config override

This commit is contained in:
Vortrex
2022-05-15 04:20:47 -05:00
parent 1f3680a38b
commit 47275239d0
2 changed files with 16 additions and 0 deletions

View File

@@ -408,6 +408,10 @@ function getClientFromSyncerId(syncerId) {
// ===========================================================================
function triggerWebHook(messageString, serverId = getServerId(), type = VRR_DISCORD_WEBHOOK_LOG) {
if(!getGlobalConfig().discord.webhook.enabled) {
return false;
}
let tempURL = getGlobalConfig().discord.webhook.webhookBaseURL;
tempURL = tempURL.replace("{0}", encodeURI(messageString));
tempURL = tempURL.replace("{1}", serverId);