From 4048a878e635a4cb5fd0cf72305c47c303735045 Mon Sep 17 00:00:00 2001 From: Leppunen Date: Tue, 15 Dec 2020 18:28:04 +0200 Subject: [PATCH] Update client numbering to start from 1 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1fcedd1..4a35a27 100644 --- a/index.js +++ b/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); }); });