refactor: replace console.* with logger in core lib files
Update loaders, handlers, and BotClient to use centralized logger: - CommandLoader.ts and EventLoader.ts - AutocompleteHandler.ts, CommandHandler.ts, ComponentInteractionHandler.ts - BotClient.ts Provides consistent formatting across all core library logging.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { AutocompleteInteraction } from "discord.js";
|
||||
import { AuroraClient } from "@/lib/BotClient";
|
||||
import { logger } from "@lib/logger";
|
||||
|
||||
/**
|
||||
* Handles autocomplete interactions for slash commands
|
||||
@@ -15,7 +16,7 @@ export class AutocompleteHandler {
|
||||
try {
|
||||
await command.autocomplete(interaction);
|
||||
} catch (error) {
|
||||
console.error(`Error handling autocomplete for ${interaction.commandName}:`, error);
|
||||
logger.error(`Error handling autocomplete for ${interaction.commandName}:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user