Weird Error

CombinedPropertyError (1)
Received one or more errors

input[2]
| CombinedPropertyError (1)
| Received one or more errors
|
| input.value
| | ExpectedConstraintError > s.string.lengthGreaterThanOrEqual
| | Invalid string length
| |
| | Expected: expected.length >= 1
| |
| | Received:
| | | ''

at ArrayValidator.handle (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\shapeshift\dist\index.js:473:70)
at ArrayValidator.parse (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.spliceFields (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@discordjs\builders\dist\index.js:263:31)
at EmbedBuilder.setFields (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@discordjs\builders\dist\index.js:281:10)
at HelpCommand.messageRun (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\commands\Utility\help.js:36:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CoreMessageCommandAccepted.js:20:23
at async Object.fromAsync (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\result\dist\index.js:613:22)
at async CoreListener.run (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CoreMessageCommandAccepted.js:17:22)
at async Object.fromAsync (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\result\dist\index.js:613:22)
CombinedPropertyError (1)
Received one or more errors

input[2]
| CombinedPropertyError (1)
| Received one or more errors
|
| input.value
| | ExpectedConstraintError > s.string.lengthGreaterThanOrEqual
| | Invalid string length
| |
| | Expected: expected.length >= 1
| |
| | Received:
| | | ''

at ArrayValidator.handle (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\shapeshift\dist\index.js:473:70)
at ArrayValidator.parse (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\shapeshift\dist\index.js:212:88)
at EmbedBuilder.spliceFields (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@discordjs\builders\dist\index.js:263:31)
at EmbedBuilder.setFields (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@discordjs\builders\dist\index.js:281:10)
at HelpCommand.messageRun (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\commands\Utility\help.js:36:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CoreMessageCommandAccepted.js:20:23
at async Object.fromAsync (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\result\dist\index.js:613:22)
at async CoreListener.run (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\framework\dist\optional-listeners\message-command-listeners\CoreMessageCommandAccepted.js:17:22)
at async Object.fromAsync (C:\Users\cmart\Desktop\Discord Bots\Sapphire\node_modules\@sapphire\result\dist\index.js:613:22)
Code:
.setFields(
{
name: `Description`,
value: `${command.description || "No description."}`,
inline: false,
},
.setFields(
{
name: `Description`,
value: `${command.description || "No description."}`,
inline: false,
},
12 Replies
d.js toolkit
d.js toolkit•15mo 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!
-Carlosđź‘‘
-Carlos👑OP•15mo ago
the code I provided is from line 36 to 41
Amgelo
Amgelo•15mo ago
what are the other fields you're setting?
-Carlosđź‘‘
-Carlos👑OP•15mo ago
const embed = new EmbedBuilder()
.setAuthor({
name: `Command Information | Command: ${command.name}`,
iconURL: this.container.client.user.displayAvatarURL(),
})
.setFields(
{
name: `Description`,
value: `${command.description || "No description."}`,
inline: false,
},
{
name: `Usage`,
value: `${
command.detailedDescription.usage
? `${command.name} ${command.detailedDescription.usage}`
: "None."
}`,
inline: false,
},
{
name: `Aliases`,
value: `${command.aliases ? command.aliases.join(", ") : "None."}`,
inline: false,
}
)
.setFooter({
text: `"<>" Means it's a required argument, "[]" means it's optional.`,
})
.setColor(this.container.config.colors.green);
const embed = new EmbedBuilder()
.setAuthor({
name: `Command Information | Command: ${command.name}`,
iconURL: this.container.client.user.displayAvatarURL(),
})
.setFields(
{
name: `Description`,
value: `${command.description || "No description."}`,
inline: false,
},
{
name: `Usage`,
value: `${
command.detailedDescription.usage
? `${command.name} ${command.detailedDescription.usage}`
: "None."
}`,
inline: false,
},
{
name: `Aliases`,
value: `${command.aliases ? command.aliases.join(", ") : "None."}`,
inline: false,
}
)
.setFooter({
text: `"<>" Means it's a required argument, "[]" means it's optional.`,
})
.setColor(this.container.config.colors.green);
whole embed anyone?
-Carlosđź‘‘
-Carlos👑OP•15mo ago
how can it be possible, that part is made so if theres no aliases it will just put "None."
Shuttle
Shuttle•15mo ago
check array length
-Carlosđź‘‘
-Carlos👑OP•15mo ago
returns 0
Shuttle
Shuttle•15mo ago
then if it's 0 you return "None"
-Carlosđź‘‘
-Carlos👑OP•15mo ago
so like ${command.aliases.length === 0 ? "None" : command.aliases.join(", ")}
Shuttle
Shuttle•15mo ago
i guess
-Carlosđź‘‘
-Carlos👑OP•15mo ago
ok thanks
Want results from more Discord servers?
Add your server