Updated prefix radio message

This commit is contained in:
dbroqua 2020-01-10 08:58:12 +01:00
parent 1cee0f8208
commit 925a0c519d

View file

@ -154,9 +154,11 @@ bot.addListener('error', function (message) {
* Fonction permettant de publier un message sur IRC * Fonction permettant de publier un message sur IRC
* @param {String} where * @param {String} where
* @param {String} what * @param {String} what
* @param {Boolean} displayRadio
*/ */
const botSay = (where, what) => { const botSay = (where, what, displayRadio) => {
bot.say(where, `${process.env.RADIO_ALIAS} : ${what}`) const message = `${(displayRadio ? `${process.env.RADIO_ALIAS} : ` : '')} ${what}`
bot.say(where, message)
} }
/** /**
@ -213,7 +215,7 @@ if (process.env.SAY_HELLO && process.env.SAY_HELLO === 'true') {
bot.addListener('join', (channel, who) => { bot.addListener('join', (channel, who) => {
// Welcome them in! // Welcome them in!
if (who !== process.env.IRC_NICKNAME) { if (who !== process.env.IRC_NICKNAME) {
botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/') botSay(process.env.IRC_CHANNEL, 'Hello ' + who + '! Have a metal day! \\m/(-.-)\\m/', false)
} }
}) })
} }