ui changes

This commit is contained in:
2025-10-03 08:39:32 -04:00
parent 1341b325ee
commit 9bc7a5e6b8
18 changed files with 629 additions and 419 deletions

View File

@@ -1,23 +1,16 @@
const fs = require('fs');
const path = require('path');
const { readDb } = require('../../backend/db.js');
module.exports = {
name: 'ping',
description: 'Replies with Pong!',
execute(interaction) {
fs.readFile(path.join(__dirname, '../../backend/db.json'), 'utf8', (err, data) => {
if (err) {
console.error(err);
return interaction.reply('An error occurred.');
}
const db = JSON.parse(data);
const settings = db[interaction.guildId] || { pingCommand: false };
const db = readDb();
const settings = db[interaction.guildId] || { pingCommand: false };
if (settings.pingCommand) {
interaction.reply('Pong!');
} else {
interaction.reply('The ping command is disabled on this server.');
}
});
if (settings.pingCommand) {
interaction.reply('Pong!');
} else {
interaction.reply('The ping command is disabled on this server.');
}
},
};