From d01765e3cb2e98745f4e19f0b7272de30daf0f8b Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 10 Jan 2020 09:05:19 +0100 Subject: [PATCH] Fixed bug --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 34cb389..2bdc05d 100644 --- a/index.js +++ b/index.js @@ -154,10 +154,10 @@ bot.addListener('error', function (message) { * Fonction permettant de publier un message sur IRC * @param {String} where * @param {String} what - * @param {Boolean} displayRadio + * @param {Boolean} dontDisplayRadio */ -const botSay = (where, what, displayRadio) => { - const message = `${(displayRadio ? `${process.env.RADIO_ALIAS} : ` : '')} ${what}` +const botSay = (where, what, dontDisplayRadio) => { + const message = `${(!dontDisplayRadio ? `${process.env.RADIO_ALIAS} : ` : '')} ${what}` bot.say(where, message) } @@ -215,7 +215,7 @@ if (process.env.SAY_HELLO && process.env.SAY_HELLO === 'true') { bot.addListener('join', (channel, who) => { // Welcome them in! if (who !== process.env.IRC_NICKNAME) { - botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/', false) + botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/', true) } }) }