-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending components with non-application-owned webhooks does not send an error response #5744
Comments
We do not respond with 400 for extra fields. Extra fields are simply ignored. The documentation already indicates that this is not allowed. |
@yonilerner I believe the bug report is about the endpoint creating an empty message by ignoring the extra field, which is probably unintended. |
Hey, I'm building a dashboard for my bot, and I need to send messages as Bot that contains components and content. I'm "createMessage" rest api to send the message but the components are empty in the response just like @CheesyGamer77 mentioned. Channel for the message is selected by user and could be anyone from the guild. how implement this ? do I need to create webhook everytime? where can I learn more about application-owned webhooks? |
@harshpandey002 Please open a new issue and include the exact request (with secrets removed) and response you're using |
Please don't be that kind of commenter, just answer his question. Instead of being so rude. |
It was solved in #6563. |
Description
Sending message components with a non-application-owned Webhook results in a success response instead of an error response. This incorrectly communicates to the user that the request was valid, even though the request was in fact not valid. Resulting messages always contain empty
components
, with other fields in-tact. The documentation should reflect this behavior if intentional.Sending Content and Components
Sending the following payload
Results in the following message payload being created
Sending Only Components
Specifying only message components via the following
Results in the following empty message being created
Steps to Reproduce
content
andcomponents
specifiedReceive an HTTP 200 response with
content
, but emptycomponents
,embeds
, andattachments
Send the following cURL with only
components
specifiedcontent
,components
,embeds
, andattachments
all being emptyExpected Behavior
Receive an HTTP 400 Bad Request error response due to sending
components
from a non-app-owned webhookCurrent Behavior
Receive an HTTP 200 OK success response instead, with
components
always being emptyScreenshots/Videos
No response
Client and System Information
HTTP Client: Insomnia 2022.6.0
OS: Windows 10 Pro 64bit, version 22H2
The text was updated successfully, but these errors were encountered: