jeffthedev
DIAdiscord.js - Imagine an app
•Created by jeffthedev on 7/5/2023 in #djs-questions
CombinedError upon embed creation
Error:
Code:
Unsure as to what caused this, have tried recoding the embed part several times but it just doesn't seem to work.
If any other part of the code is required, please let me know.
Discord.js v14.11.0
CombinedError (3)
Received one or more errors
1 ExpectedValidationError > s.literal(V)
| Expected values to be equals
|
| Expected:
| | null
|
| Received:
| | undefined
2 ValidationError > s.number
| Expected a number primitive
|
| Received:
| | undefined
3 ValidationError > s.tuple(T)
| Expected an array
|
| Received:
| | undefined
at UnionValidator.handle (/Users/pc/bot/node_modules/@sapphire/shapeshift/dist/index.js:1104:23)
at UnionValidator.parse (/Users/pc/bot/node_modules/@sapphire/shapeshift/dist/index.js:212:88)
at EmbedBuilder.setColor (/Users/pc/bot/node_modules/@discordjs/builders/dist/index.js:301:20)
at EmbedBuilder.setColor (/Users/pc/bot/node_modules/discord.js/src/structures/EmbedBuilder.js:23:18)
at Object.module.exports.run (/Users/pc/bot/commands/admin/bulkadd.js:9:4)
at module.exports (/Users/pc/bot/util/events/events/messageCreate.js:18:17)
at Client.<anonymous> (/Users/pc/bot/util/events/index.js:7:69)
at Client.emit (node:events:513:28)
at MessageCreateAction.handle (/Users/pc/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at Object.module.exports [as MESSAGE_CREATE] (/Users/pc/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
CombinedError (3)
Received one or more errors
1 ExpectedValidationError > s.literal(V)
| Expected values to be equals
|
| Expected:
| | null
|
| Received:
| | undefined
2 ValidationError > s.number
| Expected a number primitive
|
| Received:
| | undefined
3 ValidationError > s.tuple(T)
| Expected an array
|
| Received:
| | undefined
at UnionValidator.handle (/Users/pc/bot/node_modules/@sapphire/shapeshift/dist/index.js:1104:23)
at UnionValidator.parse (/Users/pc/bot/node_modules/@sapphire/shapeshift/dist/index.js:212:88)
at EmbedBuilder.setColor (/Users/pc/bot/node_modules/@discordjs/builders/dist/index.js:301:20)
at EmbedBuilder.setColor (/Users/pc/bot/node_modules/discord.js/src/structures/EmbedBuilder.js:23:18)
at Object.module.exports.run (/Users/pc/bot/commands/admin/bulkadd.js:9:4)
at module.exports (/Users/pc/bot/util/events/events/messageCreate.js:18:17)
at Client.<anonymous> (/Users/pc/bot/util/events/index.js:7:69)
at Client.emit (node:events:513:28)
at MessageCreateAction.handle (/Users/pc/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at Object.module.exports [as MESSAGE_CREATE] (/Users/pc/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
const Discord = require("discord.js");
module.exports.run = async (bot, message, args, db, prefix, functions, config, color) => {
if(!bot.config.users.admins.includes(message.author.id)) return bot.functions.txt.deny(message);
const attachments = message.attachments;
var embed = new Discord.EmbedBuilder()
.setDescription('error')
.setColor(color);
if(!attachments.size) return message.channel.send({ embeds: [ embed ] });
console.log(attachments);
};
const Discord = require("discord.js");
module.exports.run = async (bot, message, args, db, prefix, functions, config, color) => {
if(!bot.config.users.admins.includes(message.author.id)) return bot.functions.txt.deny(message);
const attachments = message.attachments;
var embed = new Discord.EmbedBuilder()
.setDescription('error')
.setColor(color);
if(!attachments.size) return message.channel.send({ embeds: [ embed ] });
console.log(attachments);
};
11 replies