From f7a392e4e045083687b420e8f703251663247c34 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Thu, 13 Oct 2022 01:46:57 +0200 Subject: [PATCH] Fixed webcam event breaking mash listener. --- assets/jeopardy.json | 6 +++--- src/app.js | 1 - src/games/kill.js | 2 -- src/games/mash.js | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/jeopardy.json b/assets/jeopardy.json index 878334d..3b7b76e 100644 --- a/assets/jeopardy.json +++ b/assets/jeopardy.json @@ -2026694,10 +2026694,10 @@ "air_date": "2002-12-23", "question": "She's a real Bohemian when she wears this 5 inches above the knee", "value": 3800, - "answer": "hem ian)", + "answer": "hem", "round": "Double Jeopardy!", "show_number": "4216", - "fullAnswer": "hem (Bo(hem)ian)" + "fullAnswer": "Bo(hem)ian" }, { "category": "PARTY TIME!", @@ -2039899,4 +2039899,4 @@ "show_number": "4999", "fullAnswer": "Grigori Alexandrovich Potemkin" } -] \ No newline at end of file +] diff --git a/src/app.js b/src/app.js index d7f6d00..589bfa1 100644 --- a/src/app.js +++ b/src/app.js @@ -109,7 +109,6 @@ function onConnect(data, bot) { } function onRooms({ rooms, users }, bot) { - console.log('rooms', rooms); logger.info(`Joined ${rooms.map((room) => room.name).join(', ')}`); /* eslint-disable no-param-reassign */ diff --git a/src/games/kill.js b/src/games/kill.js index f6ec264..6273675 100644 --- a/src/games/kill.js +++ b/src/games/kill.js @@ -1,8 +1,6 @@ const config = require('config'); function onCommand(args, context) { - console.log(context); - context.bot.socket.transmit('message', { roomId: context.room?.id, recipient: context.message.user?.username, diff --git a/src/games/mash.js b/src/games/mash.js index 12d907c..4459e93 100644 --- a/src/games/mash.js +++ b/src/games/mash.js @@ -188,7 +188,7 @@ function onCommand(args, context) { } function onMessage(message, context) { - if (mash && context.user.id !== config.user.id) { + if (mash && context.user?.id !== config.user.id) { play(message.body, context, true); } }