Added PM support to chat.

This commit is contained in:
Niels Simenon
2023-04-11 00:37:03 +02:00
parent ee50935339
commit da9c85d90c
6 changed files with 76 additions and 33 deletions

View File

@@ -145,7 +145,7 @@ function onCommand(args, context) {
}
function onMessage(message, context) {
if (games.has(context.room.id)) {
if (games.has(context.room?.id)) {
const letter = message.body.match(/^\s*\w\s*$/)?.[0];
const word = message.body.match(/^\s*\w{2,}\s*$/)?.[0];