invite.delete()

for (const invite of invites.values()) {
if (invite.uses === undefined) {
continue; // skip this invite and move on to the next one
}
await invite.delete();
}
for (const invite of invites.values()) {
if (invite.uses === undefined) {
continue; // skip this invite and move on to the next one
}
await invite.delete();
}
Does anyoen know why the invite is not being deleted? When I console.log invites size I get 980 but it only loop through one invite and stays stuck on the invite.delete() and when I console log the invite I actually get the invite
1 Reply
d.js toolkit
d.js toolkit14mo 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!
Want results from more Discord servers?
Add your server