Want to setup and confirm the rateLimit(ed) event
So I want to setup the rate limit event, but am having trouble getting it to fire, KinectThePascal suggested to edit channel, which does rate but doesn't fire the event, begins here: https://discord.com/channels/222078108977594368/824411059443204127/1050013001572421652
Code:
I have tried:
Client({ rateLimited })
Client({ rateLimit })
Client({ rest: { rateLimited } })
Client({ rest: { rateLimit } })
client.on('rateLimit'
client.on('rateLimited'
client.rest.on('rateLimit'
client.rest.on('rateLimited'
Least I'm pretty sure I've tried all these...
I am using a quick prefix-command to trigger the rate limits: Channel Edit Errored RateLimitError[/channels/:id]
17 Replies
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
Try this in ready event
console.log(client.rest.listenerCount('rateLimited'))
So perhaps the event is registering, but we're not finding a reliable way to trigger it correctly š¤ that or there is a DJS bug?
So you are editing the channel with a different name each time right?
Are you on Node.js v18?
ah, I am on v16 on this machine
Should be fine
16.9+ right?
v16.13.0
What about this?
Yea I was incrementing the name each time...except for when it was erroring, then I just did the same name each time to continue the errors anyway
Small correction(s), I'm on:
DJS v14.3.0
Node v16.13.0
Could you update djs?
My thinking too, will do so now
Fully Updated, will give the variations another go when I can
channel name changes encounter a sublimit, sublimits do not fire the ratelimited event because they hit the ratelimit (intentionally) on the first go around
ah, so which could I force to make the event fire @ckohen š¤ ?
reactions
react twice back to back and it'll fire
ah, let me try
Like a boss, thank you friend:
Interestingly doing:
Doesn't trigger, so gonna stick with
client.rest.on
Did this to force the error:
ā
Resolved ā¤ļø