Add multiple command channel support
This commit is contained in:
parent
9b39b1833e
commit
e5f69a4d72
2 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
"IgnorePNSL": false,
|
"IgnorePNSL": false,
|
||||||
"UseParallelUniverse": true,
|
"UseParallelUniverse": true,
|
||||||
"Users": [],
|
"Users": [],
|
||||||
|
"Channels": [],
|
||||||
"Prefix": "!!",
|
"Prefix": "!!",
|
||||||
"MaxConnections": 30,
|
"MaxConnections": 30,
|
||||||
"MaxChunkSize": 2000,
|
"MaxChunkSize": 2000,
|
||||||
|
|
6
index.js
6
index.js
|
@ -193,7 +193,11 @@ if (!Config.IgnorePNSL) {
|
||||||
listenClient = createTwitchClient();
|
listenClient = createTwitchClient();
|
||||||
listenClient.connect();
|
listenClient.connect();
|
||||||
listenClient.on('ready', async () => {
|
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`);
|
console.log(`${chalk.green('[TWITCH]')} || Command listener connected`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue