Closed ggggg closed 3 years ago
It's a Discord API error so we can't really do anything about this. You should ask in DDev server probably. It also invalidated my bot session...
Alright, I sent it on the server but I believe the devs are on break until the 12th so I might have to post it again after the 12th.
Regardless of the API I think it is possible to add a number check on https://github.com/discordjs/discord.js/blob/ec06ba7ad04d21e61f3e734e489607a1a5ab3568/src/managers/GuildMemberManager.js#L129 or on https://github.com/discordjs/discord.js/blob/ec06ba7ad04d21e61f3e734e489607a1a5ab3568/src/managers/GuildMemberManager.js#L346 to solve this issue.
Something like:
foreach id in users
if id is not number
throw some error
I would write this off as user error.
We probably can check, but it seems redundant if the developer itself could just sanitize and check the input before passing it to the library.
Before I noticed this issue I was under the impression it would be treated the same as an invalid ID, would be nice to let the developer know, but you are right; its not needed per say and the discord API should just respond with error code 400 or something instead of time out the application.
I guess I should wait for the discord developers to fix this issue. Thank you @iCrawl and @DTrombett for explaining!
Please describe the problem you are having in as much detail as possible: I don't know if this is an API issue or discord.js, please let me know if I should report it somewhere else.
When entering anything that's not a number id, the API times out, instead of throwing an error/ignoring the id. The bot disconnects and reconnects before throwing the timeout error.
However, it works if I enter an invalid number ID.
Include a reproducible code sample here, if possible:
Output:
Further details:
Relevant client options: