From d493a7c3e571afb46b6d471a794ddb1d13648096 Mon Sep 17 00:00:00 2001 From: Lluis Date: Wed, 16 Oct 2024 14:37:17 +0200 Subject: [PATCH] fix bot --- lib/eventSub.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/eventSub.js b/lib/eventSub.js index 09cb17d..a8c3f0b 100644 --- a/lib/eventSub.js +++ b/lib/eventSub.js @@ -30,7 +30,12 @@ class EventSub { async subscribeEvent (channelId) { this.middleware.onChannelFollow(channelId, config.twitch.userId, event => { console.log(`${event.userDisplayName} just followed ${event.broadcasterDisplayName}!`); - bot.say(`#${config.twitch.channels}`, `Gracias por seguirnos ${event.userDisplayName}!`) + this.bot.say(`#${config.twitch.channels}`, `Gracias por seguirnos ${event.userDisplayName}!`) + }); + + this.middleware.onChannelRedemptionAddForReward(channelId, 21929, event => { + console.log(`${event.userDisplayName} just redeemed ${event.rewardTitle}!`); + this.bot.say(`#${config.twitch.channels}`, `Gracias por redimir ${event.rewardTitle} ${event.userDisplayName}!`) }); } }