Constructor
new RateLimiter(limit: string, global: boolean)
Parameters:
Name | Type | Description |
---|---|---|
limit |
|
Ratelimit string matching the regex |
global |
|
Whether or not this RateLimiter handles global ratelimits |
- Deprecated:
- Will be removed in a future release. Use
RateLimitManager
instead
- Will be removed in a future release. Use
- Source:
Methods
.get(message: Message, userOverride: User) → RateLimit
Returns the RateLimit object for the message author if global or message member if message is in a guild. If a userOverride is given then the RateLimit or global RateLimit will be retrieved for that user based on the message location
Parameters:
Name | Type | Description |
---|---|---|
message |
|
Discord.js Message object |
userOverride |
|
User object to use in place of Message author |
- Source: