From b3ab3bf1bac6e6b543b3b92f119d86649d1a77b1 Mon Sep 17 00:00:00 2001 From: ThePendulum Date: Mon, 21 Aug 2023 23:12:02 +0200 Subject: [PATCH] Fixed kill announce for IRC.. --- src/games/kill.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/games/kill.js b/src/games/kill.js index 0cf5824..3025816 100755 --- a/src/games/kill.js +++ b/src/games/kill.js @@ -15,16 +15,14 @@ function onCommand(args, context) { } } - if (context.platform === 'irc') { - Object.keys(context.bot.rooms).forEach((roomId) => { - context.sendMessage(`Kill command used by ${style.bold(context.user.username)}, shutting down... :sleeping:`, roomId, { type: 'message', label: false }); + if (config.platform === 'irc') { + context.bot.rooms.forEach((room) => { + context.sendMessage(`Kill command used by ${style.bold(context.user.username)}, shutting down... 😴`, room.id, { type: 'message', label: false }); }); if (context.room.id === config.user.id) { // if the room ID is the bot's own nickname, it's a PM and we should reply to the sender - context.sendMessage('Shutting down... 😴', context.user.id, { label: false }); - } else { - context.sendMessage('Shutting down... 😴', context.room?.id, { type: 'message', label: false }); + context.sendMessage('Shutting down... 😴', context.user.id, { type: 'message', label: false }, context.message.user.username); } }