Banning doesn't delete msgs

I have made a ban code and will attach the important part below. The problem is that when I use the code, it bans the user but isn't deleting messages which I think it should. Plz enlighten me on this issue
await user.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: reason }
await user.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: reason }
Thnx
2 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
NanotechPikachu
NanotechPikachuOP2y ago
await user.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: reason })
await user.ban({ deleteMessageSeconds: 60 * 60 * 24 * 7, reason: reason })
Node: 18.16.1 No errors I am on latest version I can find And mostly I think it's a discord error I cannot. Cuz In host, there is no shell Ok
{
"dependencies": {
"discord.js": "^14.11.0",
"fs": "^0.0.1-security",
"path": "^0.12.7",
"moment": "^2.29.4",
"mongodb": "^5.7.0",
"mongoose": "^7.3.4",
"glob-promise": "^6.0.3",
"moment-duration-format": "^2.3.2"
}
}
{
"dependencies": {
"discord.js": "^14.11.0",
"fs": "^0.0.1-security",
"path": "^0.12.7",
"moment": "^2.29.4",
"mongodb": "^5.7.0",
"mongoose": "^7.3.4",
"glob-promise": "^6.0.3",
"moment-duration-format": "^2.3.2"
}
}
Package.json And the result of the code is 14.11.0
Want results from more Discord servers?
Add your server