Fixed webcam event breaking mash listener.

This commit is contained in:
ThePendulum 2022-10-13 01:46:57 +02:00
parent abc55e81a6
commit f7a392e4e0
4 changed files with 4 additions and 7 deletions

View File

@ -2026694,10 +2026694,10 @@
"air_date": "2002-12-23", "air_date": "2002-12-23",
"question": "She's a real Bohemian when she wears this 5 inches above the knee", "question": "She's a real Bohemian when she wears this 5 inches above the knee",
"value": 3800, "value": 3800,
"answer": "hem ian)", "answer": "hem",
"round": "Double Jeopardy!", "round": "Double Jeopardy!",
"show_number": "4216", "show_number": "4216",
"fullAnswer": "hem (Bo(hem)ian)" "fullAnswer": "Bo(hem)ian"
}, },
{ {
"category": "PARTY TIME!", "category": "PARTY TIME!",
@ -2039899,4 +2039899,4 @@
"show_number": "4999", "show_number": "4999",
"fullAnswer": "Grigori Alexandrovich Potemkin" "fullAnswer": "Grigori Alexandrovich Potemkin"
} }
] ]

View File

@ -109,7 +109,6 @@ function onConnect(data, bot) {
} }
function onRooms({ rooms, users }, bot) { function onRooms({ rooms, users }, bot) {
console.log('rooms', rooms);
logger.info(`Joined ${rooms.map((room) => room.name).join(', ')}`); logger.info(`Joined ${rooms.map((room) => room.name).join(', ')}`);
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */

View File

@ -1,8 +1,6 @@
const config = require('config'); const config = require('config');
function onCommand(args, context) { function onCommand(args, context) {
console.log(context);
context.bot.socket.transmit('message', { context.bot.socket.transmit('message', {
roomId: context.room?.id, roomId: context.room?.id,
recipient: context.message.user?.username, recipient: context.message.user?.username,

View File

@ -188,7 +188,7 @@ function onCommand(args, context) {
} }
function onMessage(message, 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); play(message.body, context, true);
} }
} }