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

Support configurable command rate limiting #401

Open
pdellaert opened this issue Jan 18, 2023 · 6 comments
Open

Support configurable command rate limiting #401

pdellaert opened this issue Jan 18, 2023 · 6 comments

Comments

@pdellaert
Copy link
Collaborator

Feature type

Utility or complex functionality

Description

Some commands get flooded by users in certain situations, it could be useful to have a rate limiter implemented that prevents a command from being used too often within a single channel.

Proposal for the feature is:

  • Support rate limiting a command (based on time: set to a certain time interval, a command can only be used once within the time interval)
  • Introduce mod command to manage (set, unset) a rate limit for a command, can be any command (automatically matches the aliased)
  • Mod commands should be blocked from rate limiting

References (optional)

No response

Additional info (optional)

No response

Discord Username (optional)

straks#7240

@benw202
Copy link
Member

benw202 commented Jan 20, 2023

Is this looking to rate limit individual commands rather than a blanket rate limit?

@pdellaert
Copy link
Collaborator Author

Is this looking to rate limit individual commands rather than a blanket rate limit?

Yeah, idea is to have .ratelimit when 10s and it rate limits the .when command. The only question I have if it is server-wide, or if we want to be able to say it's just for a specific channel.

I feel like per channel is a fair amount of work to maintain, but server wide might be very restrictive.

@benw202
Copy link
Member

benw202 commented Jan 21, 2023

Is this looking to rate limit individual commands rather than a blanket rate limit?

Yeah, idea is to have .ratelimit when 10s and it rate limits the .when command. The only question I have if it is server-wide, or if we want to be able to say it's just for a specific channel.

I feel like per channel is a fair amount of work to maintain, but server wide might be very restrictive.

Hmm yeah, there will be pros and cons to both. Probably worth a discussion in #moderation or with @CS

@pdellaert
Copy link
Collaborator Author

pdellaert commented Jan 21, 2023

Is this looking to rate limit individual commands rather than a blanket rate limit?

Yeah, idea is to have .ratelimit when 10s and it rate limits the .when command. The only question I have if it is server-wide, or if we want to be able to say it's just for a specific channel.
I feel like per channel is a fair amount of work to maintain, but server wide might be very restrictive.

Hmm yeah, there will be pros and cons to both. Probably worth a discussion in #moderation or with @CS

Or we make it two commands .ratelimit, which is global; and .channelratelimit which is local to the channel. If there's a local rate limit, then it takes precedence over the global one (it overwrites it for the specific channel).

@NathanInnes
Copy link
Member

Why ratelimit the commands?

@pdellaert
Copy link
Collaborator Author

It's a request to prevent spams like .when in chat. This command would set a temporary rate limit on a specific command. Details TBD. I propose it is tracked per channel, but can be set as a global rule, or a channel specific rule (globally set to 10s == each channel can have the command once every 10 seconds; channel specific rule only applies to that channel)

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

3 participants