From 529344c76dc5f832afeb4c0ce77c6f64f0d87fa3 Mon Sep 17 00:00:00 2001 From: zneix Date: Tue, 23 Mar 2021 10:56:20 +0100 Subject: [PATCH] Flipped boolean logic to not break old configs --- config_dist.json | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config_dist.json b/config_dist.json index cf45f31..0c68639 100644 --- a/config_dist.json +++ b/config_dist.json @@ -2,10 +2,10 @@ "Username": "", "Password": "", "PNSLToken": "", - "UsePNSL": true, + "IgnorePNSL": false, "Users": [], "Prefix": "!!", "MaxConnections": 30, "MaxChunkSize": 2000, "DelayPerChunk": 30e3 -} \ No newline at end of file +} diff --git a/index.js b/index.js index 9e9483f..a5d8098 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,7 @@ const say = (channel, message) => { getConnection().say(channel, message); }; -if (Config.UsePNSL){ +if (!Config.IgnorePNSL){ const pnslWebSocket = new WS('wss://bot.tetyys.com/api/wss', [], {headers: {Authorization: `Bearer ${Config.PNSLToken}`}}); pnslWebSocket.on('open', () => { @@ -210,7 +210,7 @@ if (Config.UsePNSL){ const mods = await getConnection().getMods(channel); if (!mods.includes(Config.Username)) return say(Config.Username, `I am not a moderator in channel ${channel}!`); } - if (Config.UsePNSL) { + if (!Config.IgnorePNSL) { const data = await fetchList(listID); await runList(data.listData, listID, channel || channelName); }