Giveaway/Raffle Bot Closure


#1

Hello! Is it normal for the bot to cancel/reset a giveaway once the bot is closed? I typically like to promote my giveaways for about a week prior to the actual giveaway just so everyone has a chance to gain their currency and redeem them for tickets. This also allows new followers/viewers a chance to redeem more tickets. But every time I start a giveaway and people redeem tickets, once I get off for the night and close everything down, the bot completely resets and cancels the giveaway as if it has no memory of me even creating one. “There is no ticket raffle opened.” pops up in chat even though I opened one and never closed it. Idk if this is a bug or a feature that was never meant to be. If it’s not a feature, I believe the bot should remember the giveaway and store the info until the raffle is completely closed by the individual since there are those out there that promote giveaways for a few days up to a week (sometimes longer). Hopefully someone can help me if it’s actually a bug! Thank you :slight_smile:


#2

All of the giveaways stay in memory and are cleared out when the bot shuts down. None of the giveaways are designed for long term use, like you mention. This is not a bug, but how it is designed.


Raffles not persistent between sessions
#3

Thank you for the quick reply! Would it ever be possible for a feature like this to be implemented for those that like to promote a giveaway in advance?


#4

I don’t see why it wouldn’t be. May cause some performance issues on load though (like loading the raffle panel may take longer due to loading the names)?

Could put in a feature request for it if there isn’t one already (if there is vote for it to be implemented)


#5

The issue is the hammering on the database and the delay as lag that occurs because we have to run in auto commit mode to keep data as safe as possible. This is why for some operations we have to turn off auto commits – for example, time and points distribution. As channels get larger, the job was never finishing and stacking up.

So, basically, what can happen is the writes get stacked in the command and the database starts to put wait states on additional queries/updates (or queries start to perform more and more dirty reads) and it leads to an overall slowdown of all operations that then rely on the database.


#6

Would it be possible to have the bot confirm ticket purchases in chat? Once someone redeems tickets, there is no confirmation for this unless I confirm it myself by looking it up and telling them. Is there way to implement this so the bot confirms a ticket purchase for the viewer? Possible a toggle confirmation for those that may or may not want this?

Ex:
Viewer: !tickets 3
PhantomBot: has redeemed 3 ticket(s)! PogChamp PogChamp PogChamp


#7

The bot limits itself to 20 messages in 30 seconds to prevent being banned for 30 minutes in the event that the moderation flag is accidentally reset (including by Twitch). This is why messages like this are disabled. Those 20 messages include the ability to perform timeouts as well.

An option that I have been kicking around is having messages such as this in a browser window that could be captured via OBS. This way we don’t even have to worry about Twitch chat limits and would encourage people to be looking at the stream.


#8

That would be pretty cool! Having a browser source for it and just a simple pop up.
Maybe a list forms as people enter as it shows how many tickets each person has. Updates as they redeem tickets.
I would suspect that a pop up notification could be spammed depending on how many max tickets they can buy :joy:


#9

No matter what, something could be spammed, that is the problem! If we designed something like this, I would think it would be a small item that you could tuck away on a certain spot on your scene (at least, OBS calls them scenes). If this sounds like a happy middle ground, I can see what we can do to make this happen.

To get around the spam, what I would probably look at is queuing up data over, say, 15 or 30 seconds, then displaying the data, rather than a ton of individual pop-ups. Have to think about it.


#10

Hey,
i have the same problem after reboot VServer/Phantombot. The Ticket Raffle is then close and all users are confused why they don´t have any tickets :frowning: I understand this is not a bug. But can i open a new Raffle and give the users the Tickets back? Or other: can the admin buy tickets for another user? I start a giveaway for 30 days…and now, my VServer must be restart :frowning: I know that i can give the user points an then they are rebuy tickets…but this is not a perfect way…


#11

There’s no functionality for what you’re asking currently.

You’d have to create a command to have the admin buy the tickets, as it does not exist.

You can give the users the points back, but it’d be manually.

If you really want the giveaways to work through bot restarts; you’ll have to modify the code to log all the users into a text file or similar, then load in on startup. But, the bigger the raffle, the longer the load time.

Long story short, you’d have to write code for a realistic solution.


#12

Thanks for your answer. I feared it… :frowning: