jagrosh / GiveawayBot

🎉 Hold giveaways quickly and easily on your Discord server!
https://giveawaybot.party
Apache License 2.0
646 stars 302 forks source link

Prevent the bot from picking members to win who left the server #245

Closed iced-queen closed 1 year ago

iced-queen commented 1 year ago

I fairly often have the issue where it picks a winner or winners who left the server, and then I need to reroll the giveaway. But lets say it's picking 3 winners and only 1 of them left the server. Then I gotta reroll all 3 winners, so does other 2 are either gonna feel scammed, or I gotta have more winners than I wanted to (and maybe the reroll(s) picks more members who left, so I could end up with 12 winners when I only wanted 3).

The best solution to this would probably be to have the bot pick a new winner automatically from the start if a member is no longer in the server when the winner(s) is/are picked.

zplus11 commented 1 year ago

Although you can choose a number of winners between 1 and 10 to reroll, the bot by default only rerolls one winner when you run the "/greroll" command. So I don't know why you would have to reroll all of them... Besides, the number 12 is an exaggeration. You would never have to reroll 12 people on a giveaway with 3 winners even by the logic you describe. It would be insane. Say 2 left, then just reroll once (thereby getting 3 winners by your logic). That should be enough to fill the 2 vacant seats. So in all it'll be 4 winners not 12. And again, this was following your logic. If you do it the GiveawayBot way, you'll have no more than your desired number of winners no matter what, in such a case.

jagrosh commented 1 year ago

As stated, rerolling by default only rerolls one new winner, and it doesn't overwrite the existing winners.

Additionally, this is not the easiest thing to implement into the bot. Since the bot is REST-only, it doesn't actually know if users have left the server. Making additional API calls to check for this seems excessive, especially since some servers might want to allow anyone who has entered to win, and rerolling is very easy.