Error

node:events:495 throw er; // Unhandled 'error' event ^ CombinedPropertyError: Received one or more errors at _ArrayValidator.handle (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:480:70) at _ArrayValidator.parse (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:216:88) at EmbedBuilder.addFields (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@discordjs\builders\dist\index.js:225:31) at Client.<anonymous> (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\events\antinuke\anti-actions\anti-server.js:40:6) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:398:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) { errors: [
17 Replies
d.js toolkit
d.js toolkit12mo 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 staff
Austn
AustnOP12mo ago
1, CombinedPropertyError: Received one or more errors at _ObjectValidator.handleIgnoreStrategy (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:1273:72) at _ObjectValidator.handleStrategy (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:1143:47) at _ObjectValidator.handle (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:1243:17) at _ObjectValidator.run (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:202:23) at _ArrayValidator.handle (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:474:37) at _ArrayValidator.parse (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@sapphire\shapeshift\dist\index.js:216:88) at EmbedBuilder.addFields (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\node_modules@discordjs\builders\dist\index.js:225:31) at Client.<anonymous> (E:\My Important Files\Vox Bot all\Vox Bot\bot-master\apps\bot\events\antinuke\anti-actions\anti-server.js:40:6) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errors: [ [ 'value', [ExpectedConstraintError] ] ] } ] ] } Node.js v18.18.0
treble/luna
treble/luna12mo ago
something is wrong in your addFields
Austn
AustnOP12mo ago
can u say in which file ??
treble/luna
treble/luna12mo ago
no
Austn
AustnOP12mo ago
ok
treble/luna
treble/luna12mo ago
althouhg might be coming from yout anti-server
Austn
AustnOP12mo ago
yes i think the same when i use <Guild>.setIcon(<URL>) the error arise when i comment then it worked
treble/luna
treble/luna12mo ago
thats pretty impossible since this error points to your embedbuilder
Austn
AustnOP12mo ago
i thought the same but it's wasn't the problem. i debugged several time.
treble/luna
treble/luna12mo ago
something else is just going on since you never show any code, its hard to just guess
Austn
AustnOP12mo ago
if (og.icon !== ng.icon) {
const ICON_URL = `https://cdn.discordapp.com/icons/${ng.id}/${og.icon}.${og.icon.startsWith("a_") ? "gif" : "png"}`
console.log('icon received')
console.log(ICON_URL)
changed.push(`Changed server icon from ${ICON_URL} to ${ICON_URL}`);
await ng.setIcon(ICON_URL);

}
if (og.icon !== ng.icon) {
const ICON_URL = `https://cdn.discordapp.com/icons/${ng.id}/${og.icon}.${og.icon.startsWith("a_") ? "gif" : "png"}`
console.log('icon received')
console.log(ICON_URL)
changed.push(`Changed server icon from ${ICON_URL} to ${ICON_URL}`);
await ng.setIcon(ICON_URL);

}
this is the code when i comment it the code runs but when its not commented it shows the error
treble/luna
treble/luna12mo ago
that code doesnt have any addFields in it
Austn
AustnOP12mo ago
const { AuditLogEvent } = require("discord.js");
const client = require("../../../index");
const { EmbedBuilder } = require("../../../lib/embedBuilder");
const { antiNukePunish } = require("../../../functions/antiNukePunish");

client.on("guildUpdate", async (og, ng) => {
const fetchedLog = await ng
.fetchAuditLogs({ limit: 1, type: AuditLogEvent.GuildUpdate })
.catch(() => {});
if (!fetchedLog) return;
const firstEntry = fetchedLog.entries.first();
if (!firstEntry) return;
const executor = firstEntry.executor;
const executorMember = ng.members.cache.get(executor.id);
if (!executorMember) return;
if (executor.id === client.user.id) return;

let changed = [];
if (og.name !== ng.name) {
changed.push(`Changed server name from ${og.name} to ${ng.name}`);
await ng.setName(og.name);
}
if (og.icon !== ng.icon) {
const ICON_URL = `https://cdn.discordapp.com/icons/${ng.id}/${og.icon}.${og.icon.startsWith("a_") ? "gif" : "png"}`
console.log('icon received')
console.log(ICON_URL)
changed.push(`Changed server icon from ${ICON_URL} to ${ICON_URL}`);
await ng.setIcon(ICON_URL);

}
if (og.vanityURLCode !== ng.vanityURLCode) {
changed.push(
`Changed vanityURLCode from ${og.vanityURLCode} to ${ng.vanityURLCode}`
);
}

const logEmbed = EmbedBuilder()
.setAuthor({
name: `${executorMember.user.username}`,
iconURL: `${executorMember.user.displayAvatarURL()}`,
})
.setThumbnail(executorMember.user.displayAvatarURL())
.setTitle(`[ANTUNUKE]: Anti Server detected`)
.addFields([
{
name: `Moderator: `,
value: `${executorMember}`,
},
{
name: `Effect Taken`,
value: `${changed.join(" \n")}`,
},
])
.setTimestamp();

await antiNukePunish(
client,
executorMember,
"Anti server is enabled",
logEmbed
);
});
const { AuditLogEvent } = require("discord.js");
const client = require("../../../index");
const { EmbedBuilder } = require("../../../lib/embedBuilder");
const { antiNukePunish } = require("../../../functions/antiNukePunish");

client.on("guildUpdate", async (og, ng) => {
const fetchedLog = await ng
.fetchAuditLogs({ limit: 1, type: AuditLogEvent.GuildUpdate })
.catch(() => {});
if (!fetchedLog) return;
const firstEntry = fetchedLog.entries.first();
if (!firstEntry) return;
const executor = firstEntry.executor;
const executorMember = ng.members.cache.get(executor.id);
if (!executorMember) return;
if (executor.id === client.user.id) return;

let changed = [];
if (og.name !== ng.name) {
changed.push(`Changed server name from ${og.name} to ${ng.name}`);
await ng.setName(og.name);
}
if (og.icon !== ng.icon) {
const ICON_URL = `https://cdn.discordapp.com/icons/${ng.id}/${og.icon}.${og.icon.startsWith("a_") ? "gif" : "png"}`
console.log('icon received')
console.log(ICON_URL)
changed.push(`Changed server icon from ${ICON_URL} to ${ICON_URL}`);
await ng.setIcon(ICON_URL);

}
if (og.vanityURLCode !== ng.vanityURLCode) {
changed.push(
`Changed vanityURLCode from ${og.vanityURLCode} to ${ng.vanityURLCode}`
);
}

const logEmbed = EmbedBuilder()
.setAuthor({
name: `${executorMember.user.username}`,
iconURL: `${executorMember.user.displayAvatarURL()}`,
})
.setThumbnail(executorMember.user.displayAvatarURL())
.setTitle(`[ANTUNUKE]: Anti Server detected`)
.addFields([
{
name: `Moderator: `,
value: `${executorMember}`,
},
{
name: `Effect Taken`,
value: `${changed.join(" \n")}`,
},
])
.setTimestamp();

await antiNukePunish(
client,
executorMember,
"Anti server is enabled",
logEmbed
);
});
treble/luna
treble/luna12mo ago
if its an empty array, it will error
Austn
AustnOP12mo ago
what does forceStatic do in iconURL how do i get the servericon is animated or not ?
Want results from more Discord servers?
Add your server