Skip to content

Commit

Permalink
fix: Add another check for isWhisper
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Aug 17, 2021
1 parent cfb5d87 commit 8e5365f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Twitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default class Client {
}

private cooldown (msg: PrivmsgMessage | WhisperMessage) {
const isWhisper = msg instanceof WhisperMessage
const isWhisper = msg instanceof WhisperMessage || !(msg.channelID)
const dateNow = Date.now()

const foundChannelCooldown = this.channels.get(isWhisper ? this.id : (msg as PrivmsgMessage).channelID)
Expand Down

0 comments on commit 8e5365f

Please sign in to comment.