feat(lib/log): changing the wrap of the log to include the indent parameter

This commit is contained in:
Raphael 2025-10-26 22:29:47 +01:00 committed by Raphaël
parent 5db4a7939d
commit 19babd28f1
2 changed files with 4 additions and 5 deletions

View file

@ -40,7 +40,7 @@ for (const folder of commandFolders) {
if ('data' in command && 'execute' in command) { if ('data' in command && 'execute' in command) {
client.commands.set(command.data.name, command); client.commands.set(command.data.name, command);
commands.push(command.data.toJSON()); commands.push(command.data.toJSON());
log.list(command.data.name); log.list(1, command.data.name);
} }
} }
catch (err) { catch (err) {
@ -71,7 +71,7 @@ for (const folder of eventFolders) {
else { else {
client.on(event.name, (...args) => event.execute(...args)); client.on(event.name, (...args) => event.execute(...args));
} }
log.list(event.name); log.list(1, event.name);
} }
} }
catch (err) { catch (err) {
@ -80,7 +80,6 @@ for (const folder of eventFolders) {
} }
} }
console.log('\n\n'); console.log('\n\n');
try { try {
const rest = new REST().setToken(process.env.DSC_TOKEN!); const rest = new REST().setToken(process.env.DSC_TOKEN!);
const data = await rest.put( const data = await rest.put(

View file

@ -19,7 +19,7 @@ export const log = {
search: (name: string) => { search: (name: string) => {
console.log(chalk.blueBright(`🔍 | Searching for ${name}`)); console.log(chalk.blueBright(`🔍 | Searching for ${name}`));
}, },
list: (name: string) => { list: (indentation: number, name: string) => {
console.log(chalk.cyanBright(`\t✅ | ${name}`)); console.log(chalk.cyanBright(`${'\t'.repeat(indentation)}✅ | ${name}`));
}, },
}; };