skip to Main Content

Mongodb – MongooseError: Model.findOne() no longer accepts a callback at Function

I've encountered a problem while setting up mongoose. Here is my code: const { SlashCommandBuilder } = require('@discordjs/builders'); const testSchema = require(`../../Schemas.js/test`); module.exports = { data: new SlashCommandBuilder() .setName('dbtest') .setDescription('db test'), async execute(interaction) { testSchema.findOne({ GuildID: interaction.guild.id, UserID: interaction.user.id}, async(err,…

VIEW QUESTION
Back To Top
Search