Skip to content

Commit

Permalink
debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Sep 22, 2023
1 parent 39eb013 commit 5836473
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/twitch/events/src/SubscribeEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 5836473

Please sign in to comment.