Skip to content

Commit

Permalink
fix: channelID didn't exist on !befriendlier usage
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Aug 12, 2020
1 parent 84034c6 commit 80259a0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Twitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,14 @@ export default class Client {
}

private async prepareMsg (msg: PrivmsgMessage): Promise<void> {
if (msg.senderUserID === this.id) {
return
}

// TODO: REFACTOR THIS LATER.
if (msg.messageText === '!befriendlier') {
const msgBot = {
senderUserID: msg.senderUserID,
senderUsername: msg.senderUsername,
messageText: '@@bot',
}
const msgBot = { ...msg }
msgBot.messageText = '@@bot'

const foundChannel = this.channels.get(msg.channelID)

Expand Down

0 comments on commit 80259a0

Please sign in to comment.