error delete data mongodb
i would like that when the bot leaves a server it deletes all the information of the server in question. But it doesn't delete anything, can someone help me?
Database: MongoDB
14 Replies
error:
.findOne()
is an asynchronous function that returns a promise, you need to await the promise before you can call .delete()
on dataGuildDelete
how can i do it then?
await
.fineOne()
await no work
Show code
wait
@ProbablyRaging
I can't await
client.on()
callback needs to be asyncronous
Send the actual code, not just a screenshot, I'll show you the changes
Should work with the necessary changes
ohh
ok
good
THANKS