MongooseError: Model.findOne() no longer accepts a callback
Hello I coded an auditlog system and now I have a problem and I can't get it solved can someone help me here is the error message; throw new MongooseError('Model.findOne() no longer accepts a callback');
^
MongooseError: Model.findOne() no longer accepts a callback
at Function.findOne (C:\Users\canjo\Desktop\MeeTooBot\node_modules\mongoose\lib\model.js:2351:11)
at send_log (C:\Users\canjo\Desktop\MeeTooBot\src\handlers\handlerlogs.js:7:19)
at Client.<anonymous> (C:\Users\canjo\Desktop\MeeTooBot\src\handlers\handlerlogs.js:335:16)
at Client.emit (node:events:519:28)
at C:\Users\canjo\Desktop\MeeTooBot\node_modules\discord-logs\lib\handlers\voiceStateUpdate.js:47:20
at Generator.next (<anonymous>)
at C:\Users\canjo\Desktop\MeeTooBot\node_modules\discord-logs\lib\handlers\voiceStateUpdate.js:8:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\canjo\Desktop\MeeTooBot\node_modules\discord-logs\lib\handlers\voiceStateUpdate.js:4:12)
at handleVoiceStateUpdateEvent (C:\Users\canjo\Desktop\MeeTooBot\node_modules\discord-logs\lib\handlers\voiceStateUpdate.js:18:12)
Node.js v20.13.1
2 Replies
- 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 OPnot djs related
also the error itself tells you what's wrong