Closed brawaru closed 8 years ago
This was fixed in this Github repo with commit 31aeaed. It looks like it hasn't made it to a NPM release, but that shouldn't be far off
But, if they set to null
- error still here. Need some checks :wink:
I think channel.fetchMessages(100, null, "1231337456666111")
will be rejected with same error
It works if you leave it as undefined. The issue was that Superagent sends null keys as ?before=
(which Discord now hates starting from an update yesterday), whereas undefined keys are not sent at all.
Then why not check arguments and replace null
to undefined
?
qeled just committed f628e1a :smile: My PR originally had it, for some reason that was removed, but it's back now.
Fixed in f628e1a12861006b842594d0ddd93fc1f45fb722 :+1:
As said in docs, arguments
after
andbefore
can be set tonull
. But now if they set to null, library still makes request withafter
/before
parameters set to""
(empty string), Discord no longer allows this and prints error: