Skip to content
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

Use interaction.createdTimestamp instead of Date.now() in Cooldowns guide section #1466

Open
Sn4red opened this issue May 19, 2023 · 1 comment
Labels
t: request Suggestion to add new or change existing content

Comments

@Sn4red
Copy link

Sn4red commented May 19, 2023

Is your feature request related to a problem? Please describe.

If a user has a different/wrong time, it can cause an error in the cooldown since Date.now() retrieves the current timestamp from the computer where the bot is running, not from the user executing it, resulting in a potential variation in the cooldown.

Describe the solution you'd like

Using interaction.createdTimestamp can solve the problem and would be more informative for the guide, especially if someone tries the code with others.

Describe alternatives you've considered

No response

Additional notes

No response

@Sn4red Sn4red added the t: request Suggestion to add new or change existing content label May 19, 2023
@almostSouji
Copy link
Member

I do not understand the issue, can you elaborate? Timestamps are set and compared based on the same source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: request Suggestion to add new or change existing content
Projects
None yet
Development

No branches or pull requests

2 participants