If Else NightBot clause

Full disclosure I took one python class and one c++ class about a decade ago so I’m very rusty at coding and idk the syntax at all when it comes to JavaScript. So anyone who helps me, THANK YOU!

Okay so I want an If Else Nightbot command that will check the user’s twitch chat to see if they redeemed a raffle ticket using the channel points before being able to use the command !play in chat.
So If ‘username’ (submitted raffle ticket) in (x amount of time) --> ["!play"]
else [“You need to submit a raffle ticket to enter”]

Pretty much I want the bot to redirect the command !play if they didn’t use the channel point raffle ticket. Idk if there needs to be a set time counter so they cant just use one raffle and get infinite amount of !play. I do giveaways around 6 and 9 pm so if the timer could be set to 2 hours i think that would be perfect.

Again I’m very grateful for finding this community dedicated to helping people like me! :slight_smile:

Hey @Un_C3NS0R3D!

Sadly, even before getting into the code, I believe it’s not possible to get data from the channel points as far as I know. Since it’s fairly new I don’t think there’s an API end point for it, yet. So getting the amount of time since the raffle ticket has been requested will be complicated. But I can be wrong and not be aware of the solution.

Damn thats a shame. I’ll just have to manually keep kicking people who didnt submit a raffle ticket. lesigh.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.