discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

POST `/webhooks/{webhook.id}/{webhook.token}` ignores `wait` query parameter if message contains a file

Open KubaZ2 opened this issue 2 years ago • 1 comments

Description

When creating message containing a file using webhook with wait query param set to false, 200 status code is returned instead of 204.

Steps to Reproduce

Send a message containing a file using webhook with wait query param set to false.

Expected Behavior

204 status code

Current Behavior

200 status code

Screenshots/Videos

No response

Client and System Information

Own library

KubaZ2 avatar Jun 21 '22 11:06 KubaZ2

Thanks for the report. This is a quirk of the API, since wait is forced to true if there are specific post processing requirements of the request. I would recommend checking for 2xx rather than strictly 204, but we can likely improve the documentation to make this clearer.

night avatar Jun 23 '22 16:06 night