discord / discord-rpc

https://discordapp.com/developers
MIT License
1.06k stars 330 forks source link

Having issues displaying large_image and large_text #366

Open 12Echo opened 2 years ago

12Echo commented 2 years ago

I made a script that displays my ram & cpu usage (why not), but can't get the large_image and large_text to show for some reason.

I've ensured it's added to my app under Rich Presence>Art assets

This is my code for the presence:

createInter(async () => { const CPU = await osu.cpu.usage(); const MEM = await osu.mem.info(); await client.updatePresence({ details: CPU: ${CPU}%, state: RAM: ${Math.round(MEM.usedMemMb)}/${closestpw2(MEM.totalMemMb)}MB, assets : { large_image : "saitama", large_text : "Do you know da wae?" }, buttons: [{ label: 'FREE NITRO', url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }, {label: 'Social Links', url: 'https://linktr.ee/beatthegamevids'}], }); }, 5000);

but it just shows up like this: http://ss.jimmyfalcone.com/p50kfai9.png

I've been trying to get it to work, but can't seem to.

SlySven commented 1 year ago

The large (and small) images have to come from the limited (150 IIRC) assets (images) previously uploaded to the Guild that has the Application Id in use - which can only be done by the Guild Owner - and they get cached so changing them if you do happen to own the Guild does not update them immediately (IIRC it can take some hours for changes to replicated across the Discord network)...