Skip to content

Commit c3bc748

Browse files
committed
✨ tweak: update command loading logs
1 parent b8e74f0 commit c3bc748

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ try {
365365

366366
if ('data' in command && 'execute' in command) {
367367
client.commands.set(command.data.name, command);
368-
LogEngine.debug(`Loaded command: ${command.data.name}`);
368+
// Individual command loading moved to summary for cleaner logs
369369
}
370370
else {
371371
LogEngine.warn(`The command at ${filePath} is missing a required "data" or "execute" property.`);
@@ -377,7 +377,8 @@ try {
377377
}
378378
}
379379

380-
LogEngine.info(`Loaded ${client.commands.size} commands successfully.`);
380+
const commandNames = Array.from(client.commands.keys()).join(', ');
381+
LogEngine.info(`Loaded ${client.commands.size} commands successfully: ${commandNames}`);
381382
}
382383
catch (error) {
383384
LogEngine.error('Failed to load commands directory:', error);
@@ -401,6 +402,8 @@ try {
401402
.readdirSync(eventsPath)
402403
.filter((file) => usingTsNode ? file.endsWith('.ts') : file.endsWith('.js'));
403404

405+
const loadedEventNames: string[] = [];
406+
404407
for (const file of eventFiles) {
405408
const filePath = path.join(eventsPath, file);
406409

@@ -425,14 +428,14 @@ try {
425428
client.on(event.name, (...args: unknown[]) => event.execute!(...args));
426429
}
427430

428-
LogEngine.debug(`Loaded event: ${event.name}`);
431+
loadedEventNames.push(event.name);
429432
}
430433
catch (error) {
431434
LogEngine.error(`Failed to load event from ${filePath}:`, error);
432435
}
433436
}
434437

435-
LogEngine.info(`Loaded ${eventFiles.length} events successfully.`);
438+
LogEngine.info(`Loaded ${loadedEventNames.length} events successfully: ${loadedEventNames.join(', ')}`);
436439
}
437440
catch (error) {
438441
LogEngine.error('Failed to load events directory:', error);

0 commit comments

Comments
 (0)