aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
704 stars 145 forks source link

Rich Presence - No longer accepting Discord CDN. #1068

Closed p0ut closed 4 months ago

p0ut commented 4 months ago

Which package has the bugs?

The core library

Issue description

Seemingly .setAssetsLargeImage() no longer accepts an image from media.discordapp.net, but will accept it from an external source. This is not due to an update from the library though, I believe this is due to a change from Discord's side of things, as I was running an older version of the library and it seemed that a bunch of my friends who had custom rich presences using an image via the CDN was no longer being displayed.

To reproduce, send an image into a random channel, copy the link and then create a rich presence with the large image asset being set via the link.

image

Perhaps some insight into why this has happened / a possible fix?

Code sample

No response

Package version

n/a

Node.js version

n/a

Operating system

n/a

Priority this issue should have

Medium (should be fixed soon)

Checklist

Additional Information

No response

p0ut commented 4 months ago

@whiteblackgang12 but what i don't understand is, if the image is in the same channel and it still loads. how does it 'expire'? does the link to the attachment change or?..

aiko-chan-ai commented 4 months ago

image you need to add a hash for the image eg: https://cdn.discordapp.com/attachments/channelId/attachId/image.png?ex=&is=&hm=&

p0ut commented 4 months ago

@aiko-chan-ai ah yes! I told everyone to remove the hash from the link. yep, it fixed the issue, thanks. also, am I able to add you on Discord as a better place of communication?

p0ut commented 4 months ago

@whiteblackgang12 that link you have posted is completely fine. just ensure the hash value at the end of the URL is allocated such as the one you have sent.