Skip to content

Commit

Permalink
logger hata
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxuzer committed Nov 24, 2021
1 parent b87c485 commit 30fec6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/base/CommandHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class CommandHandler {

async init() {
const directories = await readdirSync("./src/commands/");
this.client.logger.templates.Log('CommandHandler', `Loading a total of ${directories.length} categories.`);
this.client.logger.log('CommandHandler', `Loading a total of ${directories.length} categories.`);
directories.forEach(async (dir) => {
const commands = await readdirSync("./src/commands/" + dir + "/");
commands.filter((cmd) => cmd.split(".").pop() === "js").forEach((cmd) => {
const response = this.loadCommand("./commands/" + dir, cmd);
if (response) {
if (typeof response == 'string')
this.client.logger.templates.Log('CommandHandler', response);
this.client.logger.log('CommandHandler', response);
else
this.client.ErrorHandler.error({
params: [cmd],
Expand Down Expand Up @@ -83,4 +83,4 @@ class CommandHandler {
}
}

module.exports = CommandHandler;
module.exports = CommandHandler;

0 comments on commit 30fec6f

Please sign in to comment.