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

add ability to limit amount of tickets a user can open in a single time period #11

Open
switchupcb opened this issue Aug 6, 2022 · 0 comments

Comments

@switchupcb
Copy link

Problem

https://docs.ticketsbot.net/setup/dashboard#ticket-limit showcases how to limit a user to a specific amount of tickers at one time. However, this does not prevent the user from ticket-spamming (by opening and closing tickets) unless the Allow Users To Close Tickets option is disabled. This means that a server that deals with ticket-spammers must sacrifice ticket efficiency for security or resource efficiency.

We do not impose any limits on the amount of tickets that a server can have open at once. However, please note that Discord only permits a total of 500 channels to exist in a server at once, and 50 channels to exist at once in a category. This means that you can move tickets to a new category if one gets filled, however you are limited to 500 channels overall by Discord.

Note: There's a limit of 1000 active threads across the whole server.

Solution

Allow servers to set ticket thresholds per insert specified time period. This can be technically described as a second rate limit that occurs at a larger scale. This means that spammers will be prevented by Discord's Rate Limit, The Bot Limit, and the Threshold. As an example, allowing one user to open 25 tickets per DAY.

Implementation

https://pkg.go.dev/golang.org/x/time/rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant