Creating emojis promise doesn't resolve

progress.push("Creating emojis...");
msg?.edit(progress.join("\n"));
try {
await Promise.all(
data.emojis.map(async (emoji, i) => {
return await guild.emojis
.create({
name: emoji.name!,
attachment: emoji.url,
roles: emoji.roles
? Array.from(emoji.roles.cache.values())
: undefined,
reason: "Backup",
})
.then((r) => {
console.log(r);
if (!r) return;
rolesMap.set(emoji.id, r.id);
progress[4] = `Created emojis ${i + 1}/${
data.emojis.length
}.`;
msg?.edit(progress.join("\n"));
})
.catch(console.error);
})
);
progress[4] = "Created all emojis.";
progress.push("Creating roles...");
msg?.edit(progress.join("\n"));
.....
progress.push("Creating emojis...");
msg?.edit(progress.join("\n"));
try {
await Promise.all(
data.emojis.map(async (emoji, i) => {
return await guild.emojis
.create({
name: emoji.name!,
attachment: emoji.url,
roles: emoji.roles
? Array.from(emoji.roles.cache.values())
: undefined,
reason: "Backup",
})
.then((r) => {
console.log(r);
if (!r) return;
rolesMap.set(emoji.id, r.id);
progress[4] = `Created emojis ${i + 1}/${
data.emojis.length
}.`;
msg?.edit(progress.join("\n"));
})
.catch(console.error);
})
);
progress[4] = "Created all emojis.";
progress.push("Creating roles...");
msg?.edit(progress.join("\n"));
.....
For some reason, its stuck at Creating emojis... and r doesn't get logged
2 Replies
d.js toolkit
d.js toolkit10mo 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!
mallusrgreat
mallusrgreatOP9mo ago
No errors as well no one has any idea about this? hmm oh i did not think of that
Want results from more Discord servers?
Add your server