So my bot is connected to 3 channels and if all 3 channels are online how can bot only work on First channel if he's going offline so swap to next channel
const tmi = require('tmi.js'),
{ channel, username, password } = require('./settings.json');
const options = {
options: { debug: true },
connection: {
reconnect: true,
secure: true
},
identity : {
username,
password
},
channels: [
'#Pok1',
'#Pok2',
'#Pok3',
]
};
const client = new tmi.Client(options);
client.connect().catch(console.error);
client.on('connected', () => {
client.say(channel, ``);
});
client.on('message', (channel, user, message, self) => {
if(self) return;
if(user.username == 'asd' && message === "zxc") {
client.say(channel, 'abc');
}
});