Skip to content

Commit

Permalink
fix: видалено const eventCategory
Browse files Browse the repository at this point in the history
  • Loading branch information
GamesTwoLife committed Dec 15, 2023
1 parent 7765f9a commit c79b611
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions handlers/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ module.exports = (client) => {
const event = require(eventPath);

const eventHandler = event.once ? client.once : (restEvents.includes(event.name) ? client.rest.on : client.on);
const eventCategory = event.once ? folder : (restEvents.includes(event.name) ? folder : folder);

eventHandler.call(client, event.name, (...args) => event.execute(...args));
console.log(`[EventHandler][${eventCategory}] Подія ${event.name} (${file}) завантажена`);
console.log(`[EventHandler][${folder}] Подія ${event.name} (${file}) завантажена`);
} catch (error) {
console.error(`[EventHandler] Помилка завантаження події з файлу ${file}: ${error.message}`);
}
Expand Down

0 comments on commit c79b611

Please sign in to comment.