banner

How to display banner ? I tried to fetch user.bannerURL or banner, but it dosent work, i have this error
C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1104
return Result.err(new CombinedError(errors));
^

CombinedError: Received one or more errors
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1104:23)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
ValidationError: Expected undefined or null
at NullishValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:764:79)
at NullishValidator.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:198:23)
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1099:32)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
validator: 's.nullish',
given: ''
},
ExpectedConstraintError: Invalid URL
at Object.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1605:27)
at StringValidator.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:202:27)
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1099:32)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
constraint: 's.string.url',
given: '',
expected: 'expected to match a URL'
}
]
}
C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1104
return Result.err(new CombinedError(errors));
^

CombinedError: Received one or more errors
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1104:23)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
ValidationError: Expected undefined or null
at NullishValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:764:79)
at NullishValidator.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:198:23)
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1099:32)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
validator: 's.nullish',
given: ''
},
ExpectedConstraintError: Invalid URL
at Object.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1605:27)
at StringValidator.run (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:202:27)
at UnionValidator.handle (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:1099:32)
at UnionValidator.parse (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.setImage (C:\Users\Welltag\Desktop\Ruby Bot\node_modules\@discordjs\builders\dist\index.js:340:23)
at Object.execute (C:\Users\Welltag\Desktop\Ruby Bot\src\commands\Utile\userInfo.js:27:4)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
constraint: 's.string.url',
given: '',
expected: 'expected to match a URL'
}
]
}
If someone can help me pls
7 Replies
d.js toolkit
d.js toolkit2y ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers.
treble/luna
treble/luna2y ago
force fetch the user to get the banner
Lick
Lick2y ago
bannerUrl is a method (function) so make sure you include () ✔️ do user.bannerURL() dont do user.bannerURL
Welltag
WelltagOP2y ago
i fetch it but it dont work i do this
await interaction.guild.members.fetch(target.id);
await interaction.guild.members.fetch(target.id);
@shitbuck i fetch it
Zayd
Zayd2y ago
send your full code someone already sent a solution so
Lick
Lick2y ago
@welltag_
let memberFetched = await interaction.guild.members.fetch(target.id);
let url = memberFetched.user.bannerURL();
//use url wherever u need it
let memberFetched = await interaction.guild.members.fetch(target.id);
let url = memberFetched.user.bannerURL();
//use url wherever u need it
if you still need help please send the block of code where this issue is happening
treble/luna
treble/luna2y ago
to access the banner, you need to force fetch the user so pass in force:true when fetching the user
Want results from more Discord servers?
Add your server