editMessage
and editWebhookMessage
send attachments twice in the same request
#1356
Labels
editMessage
and editWebhookMessage
send attachments twice in the same request
#1356
When using
Client#editMessage
,Client#editWebhookMessage
, or anything that depends on these functions (e.g.CommandInteraction#editOriginalMessage
), thefile
key is not stripped from the input object. This results in attachments being sent over simultaneously in raw binary form via thefile
form data entry, and as a JSON array converted from a Node buffer in thepayload_data
entry:This can result in requests that are much larger than they should be (e.g. a 4MB request being inflated to 16MB). It would probably be a good idea to remove
file
from the options object inRequestHandler#request
if the file argument is also present.The text was updated successfully, but these errors were encountered: