#user banner fetch
1 messages · Page 1 of 1 (latest)
ClientUser is your bot and bots cannot have a banner
nvm here
right, user payloads don't include a banner, so you have to fetch the user once for that data to be available
the force option skips the cache check and ALWAYS fetches the user from the API
(usually we check the cache before hitting the API)
user banner fetch
Do you mean like: client.users.fetch('707388753576198265')
where do you get the User instance from?
do you mean 707388753576198265?
do you want the banner of that specific user, or the command author or something?
I want the banner of a specific user using ID
then yes, that should do it
the resolving user should have #bannerURL then
provided that user has set a banner, ofc
if they dont will it just show the color?
no, that's available via a different property
which property is that?
should be #accentColor
<:_:874569322742308864> User#accentColor
The base 10 accent color of the user's banner (more...)
-ev msg.author.fetch().then(a => a.accentColor)
null
```• d.js 13.3.1 • Type: `object` • time taken: `164.425118ms`
oh, right, i have a banner
-ev msg.client.users.fetch("707388753576198265").then(u => u.accentColor)
undefined
```• d.js 13.3.1 • Type: `undefined` • time taken: `0.167434ms`
huh
User {
id: '707388753576198265',
bot: false,
system: false,
flags: [UserFlags],
username: 'IANWYTIA',
discriminator: '5895',
avatar: 'f91c6f8f7beec58c297ca88f812672bc',
banner: undefined,
accentColor: undefined
}
```• d.js 13.3.1 • Type: `object` • time taken: `0.197089ms`
but you have a color set, don't you?
im trying to display accent color as embed color and user banner as image
no
oh, is that the one they derived from the avatar?
guess that's not available via the API 
my banner color is blue
did you set that manually?
yes
then the question is... why do i not get it 
nvm, its the default
that information is not something discord gives you, it seems
-ev msg.author.fetch()
User {
id: '83886770768314368',
bot: false,
system: false,
flags: [UserFlags],
username: 'Souji',
discriminator: '0001',
avatar: '5c153c8395fbe617819749da4048172f',
banner: 'a_a9875e1da912825f5f3386cf2745f995',
accentColor: null
}
```• d.js 13.3.1 • Type: `object` • time taken: `133.025643ms`
yep
I did:
user2=interaction.options.getUser('user')||interaction.user
user3=await client.users.fetch(user2.id)
const embed = new MessageEmbed()
.setColor(user3.accentColor||'#5865F2')
.setImage(user3.bannerURL())
await interaction.reply({embeds:[embed]});
but it keeps saying i must fetch it
what you say and what you do kinda don't align...
i asked where you get the user from, so you get it from the interaction, why exactly do you say you get it via an ID then...
just user2#fetch, no need to go via client
- though i cannot see how that wouldn't work
what do you mean by "it keeps saying"?
hmm
oh
thats what you meant
'it keeps saying' as in the error
user2=interaction.options.getUser('user')||interaction.user
user3=user2.fetch()
const embed = new MessageEmbed()
.setImage(user3.bannerURL())
await ineraction.reply(embeds:[embed])
"TypeError: user3.bannerURL is not a function"
well... the code you JUST showed is different