Get number of subscription gifted
Hey, I saw that we have subscription event, and it shows the names of the people who has been gifted.
But is there a way to find out how many subs was given to each of the names, both the host and viewers?
As far as I know, Kick gifts one sub per user, I don't believe it gifts multiple, but I actually have no ideabin this regard. In the subscription gifted event, there is a list of usernames that were given subscriptions. In terms of counting how many the gifter has given over all time, I don't believe there is a way to retrieve that information from Kick outside of the leaderboard. This would have to be something you'd track internally within your application.
Ahh no, I don't mean over the lifetime.
I mean for example this. How to detect whether the viewer gifted 30 subs? 50 subs? or Custom Count of subs? In that one instance of gift event
I mean for example this. How to detect whether the viewer gifted 30 subs? 50 subs? or Custom Count of subs? In that one instance of gift event
I haven't done enough through testing in this regard. But, based on the event responses I've collected, the gifted subscriptions event will include the gifter name and an array of users who received gifted subscriptions, with that information you can gather what you need.
client.on(Events.Chatroom.SubscriptionsGifted, async (giftedInstance) => {
const data = giftedInstance.data;
const gifter = data.gifter_username; // Username of the gifter
const gift_amount = data.gifted_usernames.length; // Amount of subs gifted
})