RateLimitCommand
Triggers when the bot becomes rate limited by the API. Placeholders will return data for you. Typically meant for bot developer use and not intentionally meant for a public structure.

Really just meant for bot dev use. You can auto disable the bot on rate limit with variables etc.

Placeholders: 6

  1. 1.
    {for} - For how long the bot is rate limited
  2. 2.
    {until} - When the bot will no longer be rate limited
  3. 3.
    {limit} - How many requests/actions can be made to this gateway
  4. 4.
    {method} - Method used to the gateway (eg. edit msg rate limit = patch method)
  5. 5.
    {where} - Path used for request that triggered this event
  6. 6.
    {route} - Route used for request that triggered this event

Example 1: The event placed in the main file.

1
bot.RateLimitCommand({
2
name: "39588639875304545",
3
code: `
4
$client[name] has been rate limited for {for}
5
`
6
})
7
bot.onRateLimit()
Copied!

Example 2: The event placed in the event handler (its own file)

bot.onRateLimit() - Goes in the main file to be able to call the event!
1
module.exports.RateLimitCommand = ({
2
name: "39588639875304545",
3
code: `
4
$client[name] has been rate limited for {for}
5
`
6
})
Copied!
Last modified 5mo ago
Copy link