Incompatible embeds

Hey, i need to copy my previous embed, but when im try to do this typescript give me error:
Argument of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").APIEmbed' is not assignable to parameter of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").APIEmbed'.
Types of property 'type' are incompatible.
Type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined' is not assignable to type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined'.
Type 'EmbedType.Rich' is not assignable to type 'EmbedType | undefined'.ts(2345)
Argument of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").APIEmbed' is not assignable to parameter of type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").APIEmbed'.
Types of property 'type' are incompatible.
Type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/discord.js/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined' is not assignable to type 'import("c:/Users/nikit/Desktop/Projects/New Fraction Bot/node_modules/@discordjs/builders/node_modules/discord-api-types/payloads/v10/channel").EmbedType | undefined'.
Type 'EmbedType.Rich' is not assignable to type 'EmbedType | undefined'.ts(2345)
The code:
const newEmbed = new EmbedBuilder(interaction.message.embeds[0].toJSON())
const newEmbed = new EmbedBuilder(interaction.message.embeds[0].toJSON())
Im using the latest version of discord.js (14.16.3) and @discordjs/builders (1.9.0)
1 Reply
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Want results from more Discord servers?
Add your server