Frank
Frank
DIAdiscord.js - Imagine an app
Created by Frank on 5/13/2024 in #djs-questions
ClientUser banner is undefined when force fetching on ready
I decided to open a post because I asked in d.js help and go no reply and i then bumped the message 2+hrs later and still no reply so i asumed no one active had an idea
// ----------------------------
// on ready:
await client.users.fetch(client.user.id, { cache: true, force: true });
// I have also tried `await client.user.fetch(true);

// ----------------------------
// in command:
client.user.bannerURL({ extension: 'png' })
// ----------------------------
// on ready:
await client.users.fetch(client.user.id, { cache: true, force: true });
// I have also tried `await client.user.fetch(true);

// ----------------------------
// in command:
client.user.bannerURL({ extension: 'png' })
When I ran my command the bannerURL is undefined when it should not as I am force fetching and caching the client user once ready I moved the fetch into my command and it worked however I prefer to keep it in my ready event so I only have to do it one time. I don't understand how the banner could still be undefined I'm using latest discord.js v14.15.2
71 replies