woops fucked smth up

This commit is contained in:
Parker2991
2024-10-30 19:14:03 -04:00
parent 0a637e0c8f
commit ee887d5081
-3
View File
@@ -7,7 +7,6 @@ async function command_manager (bot, options, config, discordClient) {
bot.commandManager = {
commands: {},
commandlist: [],
collection: new Collection(),
execute (source, commandName, args) {
const command = this.getCommand(commandName.toLowerCase());
try {
@@ -162,12 +161,10 @@ async function command_manager (bot, options, config, discordClient) {
try {
if (filename.endsWith('.mjs')) {
let commands = await import(path.join(__dirname, '../commands', filename))
bot.commandManager.register(commands.command);
bot.commandManager.commandlist.push(commands.command);
} if (filename.endsWith('.js')) {
let commands = require(path.join(__dirname, '../commands', filename));
bot.commandManager.register(commands);
bot.commandManager.collection.set(commands.name, commands)
bot.commandManager.commandlist.push(commands);
}
} catch (error) {