-
Notifications
You must be signed in to change notification settings - Fork 7
Add giveaway command/event #13
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
base: main
Are you sure you want to change the base?
Conversation
ecsr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be implemented using discord.js modals instead of using a thirdparty package? Discord.js documentation on modals can be found here.
|
Works with discord.js modals now. |
|
Don't get the reactions lost when a longer giveaway is occuring and the bot restarts. |
|
How would a database help this tho? The reactions are still there, it's just that the "countdown" has to be reactivated after a restart somehow. |
The reactions are there on the discord but not stored so ultimately after a restart the whole giveaway needs to be posted again. Thats why I would suggest saving the id of the message createdAt updatedAt and so on. Now the bot can check through those message ids if one ends pick a winner from saved userId's |
ecsr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you run the linter and formatter as well, you can do this by running the following commands in a terminal.
$ npx eslint src/
$ npx prettier --write src/
|
Also as @ckhenzy is saying we probably want to store some information in the database, message id, giveaway deadline and emoji should be enough and then we can retrive all users who reacted when needed. |
|
I would store the |
:jit: