Always join bot channel

This commit is contained in:
Leppunen 2021-09-06 23:23:14 +03:00
parent e5f69a4d72
commit 6a16a7e07f

View file

@ -193,11 +193,12 @@ if (!Config.IgnorePNSL) {
listenClient = createTwitchClient(); listenClient = createTwitchClient();
listenClient.connect(); listenClient.connect();
listenClient.on('ready', async () => { listenClient.on('ready', async () => {
if (Config.Channels.length === 0) {
await listenClient.join(`#${Config.Username}`); await listenClient.join(`#${Config.Username}`);
} else {
if (Config.Channels.length !== 0) {
await listenClient.joinAll(Config.Channels); await listenClient.joinAll(Config.Channels);
} }
console.log(`${chalk.green('[TWITCH]')} || Command listener connected`); console.log(`${chalk.green('[TWITCH]')} || Command listener connected`);
}); });