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
Add description attribute to Attachment #505
Conversation
Yep that's correct ❤️ |
I'm a bit tired rn and on phone. Did you added description to adding files too? |
If not, we can merge this so bots can already access the property. |
i spent a few hours trying but discord seems to dislike me |
Ok I'm gonna make a new issue for that with additional informations. |
@plun1331 if you're interested how it would work, you could take a look here: Aiko-IT-Systems/DisCatSharp#81 Not many libs has it implemented yet. Discord sneaked it into the docs without any notice :D |
I tried to implement it in a fork but discord kept sending me 400s and I couldn't figure out why |
{
"code":50035,
"errors":{
"attachments":{
"0":{
"_errors":[
{
"code":"ATTACHMENT_NOT_FOUND",
"message":"Attachment data not found"
}
]
}
},
"message":"Invalid Form Body"
}
} Is that the error you get |
A correct payload_json would be: {
"tts":false,
"allowed_mentions":{
"parse":[
"everyone",
"users",
"roles"
]
},
"attachments":[
{
"filename":"cute.jpg",
"description":"Cute anime girl UwU",
"size":0,
"id":0
}
]
} And the files name in the file form-data has to be |
iirc thats what i was sending, but ill check |
Check if the file names are really files[n] and not encoded |
threw in a print and it's claiming this is being sent
|
thats what the lib set it to originally, what should it be set to |
No the media content type is wrong. It should be image/jpeg |
for the file? |
The media content type headers are an evil topic |
Yus let's do that |
Co-authored-by: Izhar Ahmad <54180221+nerdguyahmad@users.noreply.github.com>
Co-authored-by: Izhar Ahmad <54180221+nerdguyahmad@users.noreply.github.com>
Continued in #509 |
Pull request was closed
Summary
Adds the
description
attribute toAttachment
This can also be added to
File
, but I tried and couldn't get it to workResolves #483 (I guess)
Checklist
type: ignore
comments were used, a comment is also left explaining why