Fixed kill announce for IRC..
This commit is contained in:
parent
2e54d38383
commit
b3ab3bf1ba
|
@ -15,16 +15,14 @@ function onCommand(args, context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context.platform === 'irc') {
|
if (config.platform === 'irc') {
|
||||||
Object.keys(context.bot.rooms).forEach((roomId) => {
|
context.bot.rooms.forEach((room) => {
|
||||||
context.sendMessage(`Kill command used by ${style.bold(context.user.username)}, shutting down... :sleeping:`, roomId, { type: 'message', label: false });
|
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 (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
|
// 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 });
|
context.sendMessage('Shutting down... 😴', context.user.id, { type: 'message', label: false }, context.message.user.username);
|
||||||
} else {
|
|
||||||
context.sendMessage('Shutting down... 😴', context.room?.id, { type: 'message', label: false });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue