Last bug fix hopefully

This commit is contained in:
2023-10-19 23:50:45 +02:00
parent fe3c173855
commit d91731f8eb
2 changed files with 6 additions and 4 deletions

View File

@@ -37,12 +37,14 @@ module.exports = {
if (!settingsData) {
await settings.create({
_id: mongoose.Types.ObjectId(),
const newSetting = new settings({
_id: new mongoose.Types.ObjectId(),
name: setting,
value: value
});
await newSetting.save();
await interaction.editReply({
embeds: [{
description: "Successfully created `" + setting + "` with value `" + value + "`.",

View File

@@ -1,6 +1,6 @@
const { REST, Routes } = require('discord.js');
const env = require('dotenv').config();
const token = process.env.TOKEN;
const token = process.env.DEVTOKEN;
const clientId = process.env.DEVID;
const guildId = process.env.GUILDID;
@@ -9,7 +9,7 @@ const commands = [];
// const commandFiles = fs.readdirSync('./commands-testing').filter(file => file.endsWith('.js'));
const commandFiles = [
'./commands/config.js',
"../commands/config.js"
]
// Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment