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

Attachment Order Incoherence

Open NextdoorPsycho opened this issue 1 year ago • 3 comments

Description

Ok, The best way to describe this would be via images, but ill give a nice explanation to the best of my abilities. Uploading via the attachment system works, but when you put the attachments in out of order, the images are now out of order. unestimableness-intermediateness-il With this as the order: starfishes-cottonade-bailey-out

SO Image A (will represent the actual image Meant to go to what I call Attachment) And image M (Will rep the Mask image meant to go to what I call Mask.)

and in code, for the api, its done / asked for in the order: Attachment(Upload Image), Mask(Upload Image), Prompt(Text)

If you upload everything in the correct order, you get the correct response, however when you do this: ordeals-carlock-perfecta-cordigeri

Upload M to Mask First, then A to Attachment (Them prompt after, but prompt is fine.) The Result that I get in my code, is now Mask's image in the spot for Attachment, and Attachment's image in the Mask slot. (The Order of the uploads revert to the default upload ) [Attachment -> Mask -> Prompt] but they dont take the images with them.

IT SHOULD BE NOTED THAT THIS CAN BE AN ISSUE WITH ALL FILES, But in my testing I did it with images as that's easy to work with so the system as a whole should be looked at. Discord: nextdoorpsycho if you need any examples or anything

Steps to Reproduce

Make 2 upload containers in the slash command that do different things to an image (like turn it upside down, or just move it somewhere) Then do it once in one order, like image upload 1, then image upload 2. run the command see results.

Then, do image upload 2 first this time, and image 1 upload last. Nothing should change and both should do the same thing as before, but you will see that they have switched places

Expected Behavior

Regardless of the order of upload slots, the images should be bound to the upload container they were sent to. so they can be done in any order

Current Behavior

The images are not binding to the upload attachment slots correctly. when you do the uploads in anything but the default order, they revert back to the order, but dont bring the images with them, and just change slots. resulting in images being bound to the wrong place/wrong upload

Screenshots/Videos

n/a

Client and System Information

This happens on both Windows 11 / Mac Sonoma (m3) / Web On the Canary, dev, and latest stable builds. on all of these platforms respectively.

NextdoorPsycho avatar Nov 26 '23 19:11 NextdoorPsycho

Hey, i have the exact same issue. This seems to be the case for all files. Discord doesnt match the files by the field they were uploaded, instead of it uses the order. I have tried with 4 attachements, and the first file i upload, no matter which field always ends up in the first option supplied.

StaticFX avatar Nov 29 '23 13:11 StaticFX

Got the same problem. I also noticed some discussion around this issue in the discord.js repo.

William-Depix avatar Dec 16 '23 04:12 William-Depix

Apparently, this issue has been going on for over a year. But I'm glad to see that we finally have some traction on it over here.

NextdoorPsycho avatar Dec 16 '23 05:12 NextdoorPsycho

Guys, we are experiencing the same problem, is there anything we can do to alleviate it? Thanks a lot!

Got the same problem. I also noticed some discussion around this issue in the https://github.com/discordjs/discord.js/issues/8650.

options: [
 { value: '1022082997119352892', type: 11, name: '1' },
 { value: '1022082998105030676', type: 11, name: '2' },
 [length]: 2
]

According to this issue, is it possible to be able to get options from any api? Clients may sort the results themselves to resolve this issue.

Wh1isper avatar Apr 12 '24 03:04 Wh1isper

Nope wait for discord. It’s an issue all across the API. It’s pervasive in JS and in any other wrapper that you decide to use like dart or Java. The issue is with Discord not with anything that we’re doing wrong. But this is a pretty low level BUG. That being said, I don’t expect it to be fixed anytime soon because of how insignificant it is

On Thu, Apr 11, 2024 at 23:49 Zhongsheng Ji @.***> wrote:

Guys, we are experiencing the same problem, is there anything we can do to alleviate it? Thanks a lot!

— Reply to this email directly, view it on GitHub https://github.com/discord/discord-api-docs/issues/6545#issuecomment-2050916271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7WI7A2XEAO3DCWHKBH7X3Y45KVLAVCNFSM6AAAAAA73CGOAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQHEYTMMRXGE . You are receiving this because you authored the thread.Message ID: @.***>

NextdoorPsycho avatar Apr 12 '24 12:04 NextdoorPsycho

A fix for this issue has been merged and should be deployed soon. Thank you for the report.

jhgg avatar Apr 25 '24 20:04 jhgg