Add multiple command channel support

This commit is contained in:
Leppunen 2021-09-06 23:19:16 +03:00
parent 9b39b1833e
commit e5f69a4d72
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,7 @@
"IgnorePNSL": false,
"UseParallelUniverse": true,
"Users": [],
"Channels": [],
"Prefix": "!!",
"MaxConnections": 30,
"MaxChunkSize": 2000,

View file

@ -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`);
});