lock, mute, prefix, tempban

This commit is contained in:
yhqe committed 2026-03-22 02:15:16 -05:00
1 parent 27894dac21
commit f637673a4e
18 files changed
+3482 -2658

No files matched your search

-5
View File
@@ -5,15 +5,11 @@ const path = require('path');
const logger = require('../utils/logger');
/**
* Loads all command files from src/commands and registers them on the client.
* Each command file must export: { name, description, aliases?, usage?, execute }
*
* @param {import('discord.js').Client} client
*/
function loadCommands(client) {
const commandsPath = path.join(__dirname, '..', 'commands');
// Recursively get all .js files in commandsPath
function getAllCommandFiles(dir) {
let results = [];
const list = fs.readdirSync(dir, { withFileTypes: true });
@@ -45,7 +41,6 @@ function loadCommands(client) {
client.commands.set(command.name.toLowerCase(), command);
// Register aliases if provided
if (Array.isArray(command.aliases)) {
for (const alias of command.aliases) {
client.commands.set(alias.toLowerCase(), command);