Skip to content

Commit

Permalink
feat: Ignore failed whispers for channel chats
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Apr 22, 2022
1 parent ed406db commit e7471b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Handlers/WhisperHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ export default class WhisperHandler extends DefaultHandler {
await this.twitch.sendWhisper(userTwitch, message).catch(error => {
this.logger.error({ err: error }, 'WhisperHandler.onServerResponse() -> Twitch.sendWhisper()')

// We don't want to send these, gets too spammy.
if ([
MessageType.ROLLMATCH,
MessageType.MATCH,
MessageType.MISMATCH
].includes(result.originalType)) {
return
}

void this.twitch.sendMessage(
channelTwitch,
userTwitch,
Expand Down

0 comments on commit e7471b9

Please sign in to comment.