-
Notifications
You must be signed in to change notification settings - Fork 2
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
/role spam #54
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add a cooldown for /role and make the roles not apear in the side bar
Rationale
server owners are complaining about /role getting spammed, filling the role slots and side bar
this would get more servers to enable /role
Implementation Details
Cooldowns | discord.js Guide
using maps for per server cooldown
Explanation
Cooldown Map: A cooldowns map is initialized to keep track of cooldowns for each command.
Interaction Handling: For each command, it checks if the user is on cooldown. If so, it replies with the remaining cooldown time. Otherwise, it sets a cooldown for the user and proceeds with the command execution.
Command Logic: The existing command logic remains unchanged and is executed if the user is not on cooldown.
Additional Information
code above is from chatGPT
remember to disable roles in side bar
Note:
The text was updated successfully, but these errors were encountered: