woops fucked smth up
This commit is contained in:
parent
0a637e0c8f
commit
ee887d5081
1 changed files with 0 additions and 3 deletions
|
@ -7,7 +7,6 @@ async function command_manager (bot, options, config, discordClient) {
|
||||||
bot.commandManager = {
|
bot.commandManager = {
|
||||||
commands: {},
|
commands: {},
|
||||||
commandlist: [],
|
commandlist: [],
|
||||||
collection: new Collection(),
|
|
||||||
execute (source, commandName, args) {
|
execute (source, commandName, args) {
|
||||||
const command = this.getCommand(commandName.toLowerCase());
|
const command = this.getCommand(commandName.toLowerCase());
|
||||||
try {
|
try {
|
||||||
|
@ -162,12 +161,10 @@ async function command_manager (bot, options, config, discordClient) {
|
||||||
try {
|
try {
|
||||||
if (filename.endsWith('.mjs')) {
|
if (filename.endsWith('.mjs')) {
|
||||||
let commands = await import(path.join(__dirname, '../commands', filename))
|
let commands = await import(path.join(__dirname, '../commands', filename))
|
||||||
bot.commandManager.register(commands.command);
|
|
||||||
bot.commandManager.commandlist.push(commands.command);
|
bot.commandManager.commandlist.push(commands.command);
|
||||||
} if (filename.endsWith('.js')) {
|
} if (filename.endsWith('.js')) {
|
||||||
let commands = require(path.join(__dirname, '../commands', filename));
|
let commands = require(path.join(__dirname, '../commands', filename));
|
||||||
bot.commandManager.register(commands);
|
bot.commandManager.register(commands);
|
||||||
bot.commandManager.collection.set(commands.name, commands)
|
|
||||||
bot.commandManager.commandlist.push(commands);
|
bot.commandManager.commandlist.push(commands);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue