discord-api-docs
discord-api-docs copied to clipboard
Add Guild Member endpoint erroneously returns 400
Description
When the Add Guild Member endpoint is called against a user that is a member of the maximum number of permitted servers (200), and the user is already a guild member of the server they’re attempting to join, a 400 error response is thrown instead of the expected 204 response (No Content - already a member).
Steps to Reproduce
- Be a member of 200 discord servers, including a server you own.
- Using the API, attempt to add your user as a guild member to the server you own using the Add Guild Member endpoint.
- You will receive a 400 response for exceeding the maximum number of servers.
Expected Behavior
The endpoint should return a 204 status (No Content) when the user is already a member of the guild they’re attempting to join. I believe that the check for guild membership should be performed prior to checking their current guild membership count to prevent an erroneous status code being returned.
Current Behavior
A 400 status response is provided which indicates the user has exceeded (or is attempting to exceed) the maximum permitted guild count.
Screenshots/Videos
No response
Client and System Information
Windows 11, Postman