Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/dota/src/twitch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ twitchChat.on(
messageId: string
},
) => {
if (!channelId) return
if (!channelId) {
logger.error('No channelId', { channel, user, text })
return
}

// Skip rank check for mods and broadcasters
const isStaff = userInfo.isMod || userInfo.isBroadcaster
Expand All @@ -88,7 +91,9 @@ twitchChat.on(
logger.info('[TWITCH] Missing user', { channelId, channel, user, reason })
chatClient.say(channel, t('missingUser', { lng: 'en' }))
lastMissingUserMessageTimestamps[channel] = now
return
}
logger.error('No client', { channel, user, text, reason, channelId })
return
}

Expand Down Expand Up @@ -197,6 +202,7 @@ twitchChat.on(
!toggleCommand?.aliases?.includes(text.replace('!', '').split(' ')[0]) &&
text.split(' ')[0] !== '!toggle'
) {
logger.info('Bot is disabled', { channel, user, text })
return
}

Expand Down
Loading
Loading