input.iconURL error TS

Node: 16.16.0 Discord.js: 14.4.0 The URL of the icon Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'
const embed = new EmbedBuilder()
.setColor(Colors.DarkPurple)
.setAuthor({ name: `${guild?.name} | Ticket System`, iconURL: guild?.iconURL({ size: 512 }) ?? undefined })
.setDescription(Description);
const embed = new EmbedBuilder()
.setColor(Colors.DarkPurple)
.setAuthor({ name: `${guild?.name} | Ticket System`, iconURL: guild?.iconURL({ size: 512 }) ?? undefined })
.setDescription(Description);
2 Replies
d.js docs
d.js docs3y 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.
CanadienDragon
CanadienDragonOP3y ago
thanks
Want results from more Discord servers?
Add your server