From 5836473e4cede0c8e51d4ba69d266a729063d1d0 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 22 Sep 2023 05:48:05 -0500 Subject: [PATCH] debugs --- packages/twitch/events/src/SubscribeEvents.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/twitch/events/src/SubscribeEvents.ts b/packages/twitch/events/src/SubscribeEvents.ts index c47503b8..167000ab 100644 --- a/packages/twitch/events/src/SubscribeEvents.ts +++ b/packages/twitch/events/src/SubscribeEvents.ts @@ -7,7 +7,11 @@ import { updateUserEvent } from './twitch/lib/updateUserEvent.js' import { DOTABOD_EVENTS_ROOM, eventsIOConnected, socketIo } from './utils/socketUtils.js' export const handleEvent = (eventName: any, data: any) => { - if (!eventsIOConnected) return + if (!eventsIOConnected) { + console.log('[TWITCHEVENTS] No socket connection') + return + } + console.log('[TWITCHEVENTS] Emitting event', { eventName, data }) socketIo.to(DOTABOD_EVENTS_ROOM).emit('event', eventName, data.broadcasterId, data) }