I currently have a say embed command that worked fine in v12 that im trying to update to v14, however im getting a very large error, and im wondering how i could fix the error/update the command if i havent completely fixed everything?
This is the code:
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "embed",
aliases: [" "],
run: async (client, message, guild) => {
let args = message.content.split(" | ");
// message.delete().catch(O_o => {});
const embed = new EmbedBuilder()
.setTitle(args[1])
.setDescription(args[2])
.setThumbnail(args[3])
.setImage(args[4])
.setColor(args[5]);
message.channel.send({ embeds: });
},
};
this is the error im getting:
/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:1088
return Result.err(new CombinedError(errors));
^
CombinedError: Received one or more errors
at UnionValidator.handle (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:1088:23)
at UnionValidator.parse (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:201:88)
at EmbedBuilder.setTitle (/home/runner/bear-bot-v14/node_modules/@discordjs/builders/dist/index.js:267:20)
at Object.run (/home/runner/bear-bot-v14/commands/general/embed.js:13:8)
at Client.<anonymous> (/home/runner/bear-bot-v14/index.js:90:24)
at Client.emit (node:events:513:28)
at Client.emit (node:domain:489:12)
at MessageCreateAction.handle (/home/runner/bear-bot-v14/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at module.exports [as MESSAGE_CREATE] (/home/runner/bear-bot-v14/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) {
errors: [
ExpectedValidationError: Expected values to be equals
at LiteralValidator.handle (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:729:76)
at LiteralValidator.run (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:187:23)
at UnionValidator.handle (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:1083:32)
at UnionValidator.parse (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:201:88)
at EmbedBuilder.setTitle (/home/runner/bear-bot-v14/node_modules/@discordjs/builders/dist/index.js:267:20)
at Object.run (/home/runner/bear-bot-v14/commands/general/embed.js:13:8)
at Client.<anonymous> (/home/runner/bear-bot-v14/index.js:90:24)
at Client.emit (node:events:513:28)
at Client.emit (node:domain:489:12) {
validator: 's.literal(V)',
given: undefined,
expected: null
},
ValidationError: Expected a string primitive
at StringValidator.handle (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:1705:70)
at StringValidator.run (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:187:23)
at UnionValidator.handle (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:1083:32)
at UnionValidator.parse (/home/runner/bear-bot-v14/node_modules/@sapphire/shapeshift/dist/index.js:201:88)
at EmbedBuilder.setTitle (/home/runner/bear-bot-v14/node_modules/@discordjs/builders/dist/index.js:267:20)
at Object.run (/home/runner/bear-bot-v14/commands/general/embed.js:13:8)
at Client.<anonymous> (/home/runner/bear-bot-v14/index.js:90:24)
at Client.emit (node:events:513:28)
at Client.emit (node:domain:489:12) {
validator: 's.string',
given: undefined
}
]
}
