Update client numbering to start from 1
This commit is contained in:
parent
b4146cfc8c
commit
4048a878e6
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -30,7 +30,7 @@ const createTwitchClient = () => {
|
|||
|
||||
const sendPong = () => {
|
||||
for (const [i, client] of Object.entries(clients)) {
|
||||
client.say(Config.Username, `Pong from client ${i}`);
|
||||
client.say(Config.Username, `Pong from client ${Number(i) + 1}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,7 @@ const getConnection = () => {
|
|||
clients[i] = createTwitchClient();
|
||||
clients[i].connect();
|
||||
clients[i].on('ready', async () => {
|
||||
console.log(`${chalk.green('[CONNECTED]')} || Client ${i} Connected to twitch.`);
|
||||
console.log(`${chalk.green('[CONNECTED]')} || Client ${Number(i) + 1} Connected to twitch.`);
|
||||
await clients[i].join(Config.Username);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue