From 0eb766b0c57c176a731a5ce7bf289c110b46b13f Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 24 Mar 2024 17:46:22 +0100 Subject: [PATCH] Chnaging this idk ehy --- src/commands/config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/config.ts b/src/commands/config.ts index 044aee2..4156a5f 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -1,8 +1,8 @@ import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor } from "config/options" -import settings from "schemas/settingsSchema" import mongoose from "mongoose" import { ICommand } from "interfaces" +import settings from "schemas/settingsSchema" export = { name: "config", @@ -37,7 +37,7 @@ export = { const setting = interaction.options.getString("setting") const value = interaction.options.getString("value") - const settingsData = await settings.findOne({ name: setting }) + const settingsData = await settings.findOne({ filter: { name: setting } }) if (!settingsData) { const newSetting = new settings({ @@ -55,7 +55,7 @@ export = { }] }) } else { - await settings.findOneAndUpdate({ name: setting }, { value: value }) + await settings.findOneAndUpdate({ filter: { name: setting } }, { value: value }) await interaction.editReply({ embeds: [{