From e5f69a4d72e9d9302fb7be571395ff7e95955c53 Mon Sep 17 00:00:00 2001 From: Leppunen Date: Mon, 6 Sep 2021 23:19:16 +0300 Subject: [PATCH] Add multiple command channel support --- config_dist.json | 1 + index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config_dist.json b/config_dist.json index 345b2ea..f0b9a22 100644 --- a/config_dist.json +++ b/config_dist.json @@ -5,6 +5,7 @@ "IgnorePNSL": false, "UseParallelUniverse": true, "Users": [], + "Channels": [], "Prefix": "!!", "MaxConnections": 30, "MaxChunkSize": 2000, diff --git a/index.js b/index.js index 1747f07..d13fd92 100644 --- a/index.js +++ b/index.js @@ -193,7 +193,11 @@ if (!Config.IgnorePNSL) { listenClient = createTwitchClient(); listenClient.connect(); listenClient.on('ready', async () => { - await listenClient.join(`#${Config.Username}`); + if (Config.Channels.length === 0) { + await listenClient.join(`#${Config.Username}`); + } else { + await listenClient.joinAll(Config.Channels); + } console.log(`${chalk.green('[TWITCH]')} || Command listener connected`); });