-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to use new buttons instead of reactions #309
Comments
Ahem the thing is, buttons do not count users, so we would have no option to roll the giveaway and determine winners. |
You can save the winners in db, and it should be optional feature (disabled by default). When member clicked on the button and is already in database as parcipator, then it should be removed from database. |
I don't think it'll be a good idea and doesn't seems to work. |
Theoretically. But the count on the embed could only be updated with the interval because of rate limits, so you cannot know if you successfully participated or not. Also the db would be under heavy load cause we have to save every single participant. That could btw easily cause problems if let us say 20 or more users join in under 5s So it would be not scaleable when there are many gaws. And we also cannot detect people who entered a gaw when the bot is offline. Ik it would look nice if we coulf use buttons, but they are just not intended for this task. |
That's why it should be optional and siabled by default.
This message will be visible just to user, and when user reloads their discord client, then the message will be not there. |
are we talking about 3rd party package here? |
yeah, he means |
along with this, the iconic feature of counting giveaway reactions even after the process has been restarted wouldn't exist, since nothing would handle the interaction. |
You can use This package instead to use Buttons with giveaways, visuals would be attached below |
I checked the code and it is using an array, like we talked about. |
you can implement a cache system to handle the database stuff. And array getting too long shouldnt be a problem afaik since an array can contain 2^32 elements 🙂 |
What if the bot is offline? With reactions, we could fetch it any time which would give us back every entries |
Exactly if the bot is offline and someone clicks they won't be entered, we need to wait for Discord IF they make something like button click count and data then it would be possible |
You can use the button id, example |
Ok but the question is, how would you handle that while/when the bot is offline? |
You can't, discord have to think abou that |
But if you wanna have big and strong bot, you must have 24/7 strong host |
Anyways, imo reactions are still far better than buttons in case of giveaways but it depends upon you on how you wanna implement it. |
I think the same |
Big bot's doesn't mean they are always offline. Even dyno goes offline for maintenance and stuff, so what will guilds do at that time |
they still maintain atleast 99% uptime throughout the months |
If discord somehow/somewhen makes additions to the system, then this can get rolled up again. |
I have a somewhat acceptable solution. Maybe you can make the functions to await input in the GiveawaysManager, and then let us extend it ourselves. Maybe you could make a Buttons.js in examples? |
alright @Nico105, I have an idea. |
Well, actually makes no sense, because When the giveaway is completed, even if the reactions were collected when the bot was offline, it will not let that invalid entry to win. In buttons this is not the case. |
exemptMembers can filter out participants at the end of the giveaway. That is not something most of the users like. We want the reaction to be removed if requirements do not meet. But even that can be achieved if we add a function to check every giveaway, every reaction after the restart as they met the requirement or not but that may cause rate limits so using Buttons comes in handy here. As buttons do not allow anyone to participate while the bot is offline so they simply need to wait for the bot. Usually bot goes offline for around 5-10 mins if you use a nice VPS. |
Who is stopping you to use reaction events? lol.
Then simply do it? It's better than letting users NOT to participate in the giveaway, just for the sake to validate their entry. |
I guess you got it wrong. I m not complaining about it or saying that buttons are better than reactions. I m just saying that I like buttons more than reactions because of the discord rate limit and interaction feature which allow me to respond even if the bot is not allowed to send messages to that user or in that channel. I said buttons and reaction have their own profit and loss, depending on your requirements you may like buttons more than reaction or vice versa. For e.g, if someone has a good VPS which improve their bot uptime then buttons are better for them. Some users close their DM so the bot is not able to send messages when they participate but the interaction does not need any of that permission to work. But if your bot stays offline for a long time then the reaction may be a better option for you considering participation thing. If you apply periodic checks on every participation then removing invalid entries is also not impossible.
|
Well, I saw Dyno giveaways, clearly not liked by communities I'm in. Still an opinion, but you need to see labels of this issue 👀 |
reactions can still be used by default, buttons could just be optional to use, at your own risk |
Then you should contribute and make a pr. |
The issue has
|
I too wanted to make a pr, but I'm not sure it will be accepted |
You can try always. |
Yes, you can make PR |
ok, so how should I make it work? should I add only one button, a participate button? |
Hello, |
i'm no expert, but I guess just make a "button" object option, like lastChance, with label, style, emoji and maybe url property, no? |
Has there been any progress on this? |
You cant add user counter on button label, and you can store user somewhere maybe but still it wont get user who clicked button when bot was offline |
What do you mean it doesn't work out?? GiveawayBot is using them and it's working fine for them, and everyone else and, you can add a button to leave a giveaway. Idiot 🤦♂️ |
First of all, you don't have to insult me. But anyway, as mentioned I wrote that over 1 year ago... You are free to make a pr to add the feature yourself. #391 was already a start but still in v13. |
No thanks, I'm not doing your work. 😂 |
🤡 |
Nico is not a staff that his job is to add all things, he is also a contributor. Try to be polite towards people who are contributing to maintain this package |
Bro shut up 🤡 Your location is literally india 🗑 |
Feedback on #482 would be appreciated |
Hi, could you please add option to use Discord buttons instead of reactions?
Info:
https://discord.com/developers/docs/interactions/message-components
or can be done using https://www.npmjs.com/package/discord-buttons :
The text was updated successfully, but these errors were encountered: