Hello!
Command
async execute(interaction) {
const data = await schema.findOne({ User: interaction.user.id })
}
Schema
const mongoose = require('mongoose');
const Schema = new mongoose.Schema({
User: String,
});
module.export = mongoose.model('user', Schema);
I tried looking on the internet but couldn't find any solution that works.