Merged SChat and IRC support.

This commit is contained in:
2022-10-19 01:24:13 +02:00
parent 4580e9129f
commit ad782a5126
9 changed files with 442 additions and 496 deletions

View File

@@ -22,7 +22,12 @@ function onCommand(args, context) {
const room = Object.values(context.bot.rooms).find((botRoom) => botRoom.name === roomName);
if (room) {
context.sendMessage(args.slice(1).join(' '), roomName, { label: false });
context.sendMessage(args.slice(1).join(' '), room.id, { label: false });
return;
}
if (context.message.recipient === config.user.username) {
context.sendMessage(args.join(' '), null, { type: 'message', label: false }, context.user.username);
}
return;