Fixed webcam event breaking mash listener.

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

View File

@@ -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 */

View File

@@ -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,

View File

@@ -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);
}
}