Program Commit

This commit is contained in:
2025-10-02 17:31:49 -04:00
parent fd73be0efd
commit 1341b325ee
39 changed files with 21396 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
const fs = require('fs');
const path = require('path');
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 };
if (settings.pingCommand) {
interaction.reply('Pong!');
} else {
interaction.reply('The ping command is disabled on this server.');
}
});
},
};