jagrosh / GiveawayBot

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

[Feature Request] Reply with ephemeral message upon giveaway entry #181

Closed AJman14 closed 2 years ago

AJman14 commented 2 years ago

With the new button system replacing emoji reactions, it's hard to know if I'm entered into a giveaway. The only way to find out is by attempting to enter again.

Can the bot send an ephemeral message to the user entering a giveaway that stays there as long as the giveaway lasts?

Example: "Giveaway entered: Cyberpunk (Steam)"

jagrosh commented 2 years ago

Unfortunately this is not possible, as the reply to the button interaction is used to update the giveaway message; if it replied with an ephemeral message, the giveaway wouldn't be able to show the entrant count.

AJman14 commented 2 years ago

I would request you roll back to emoji, then. Not being able to see if you're entered into a giveaway is a huge issue.

Also, I don't see why the reply has to be used for updating the original message. It can be updated as part of the action before sending an ephemeral reply to the user. (Source: my friend made a discord bot that does exactly that with a button press)

jagrosh commented 2 years ago

We can't use reactions for stability reasons.

Because the new GiveawayBot is HTTP-only and very popular, we realistically can only do one reply action. The first response is "free" because it's our response from the server, but the second would be a separate request to Discord. Making such a request for every entry would not be possible as it would break global ratelimits quickly.

A lot of the changes to how GiveawayBot works have been to conform to how Discord wants bots handled, and to make it more stable at its size. It's actually a lot less taxing on the bot's ratelimits for someone to press the button twice to confirm than it is to take a second action.

AJman14 commented 2 years ago

While that makes sense to a degree, the lack of a visual when entered in a giveaway feels like a major oversight.

jagrosh commented 2 years ago

I think it's the best-available option given the constraints of how Discord's interactions and ratelimit systems work.

JetCrooked commented 2 years ago

if anything I would say its an oversight that discord limits bots to one "free" response, and doesn't allow them to reply to an interaction (like a button press) if it also takes some other action (updating the entrant count) without making a separate request that counts toward ratelimits

jagrosh commented 2 years ago

If Discord allowed multiple message responses, or they had an additional button state (toggle per user maybe), I'd be happy to implement that. I've opened a discussion about this on the discord api docs here

mrmelonhead commented 1 year ago

Cool