From 9d40920b325d5cef9a896d0230649db1044a3ed9 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sat, 8 Jul 2023 00:00:24 +0200 Subject: [PATCH] Update format to logging --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index cb08af3..392d51a 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,7 @@ client.on('error', console.error); client.on('guildCreate', (guild) => { console.log( - `${new Date().toISOString().substring(11, 19)}: Info: ${ + `${new Date().toISOString().substring(11, 19)}: Info: ➡️ ${ client.user.tag } has been added to server '${guild.name} (#${guild.memberCount})'!` ); @@ -86,7 +86,7 @@ client.on('guildCreate', (guild) => { client.on('guildDelete', (guild) => { console.log( - `${new Date().toISOString().substring(11, 19)}: Info: ${ + `${new Date().toISOString().substring(11, 19)}: Info: ⬅️ ${ client.user.tag } was removed from server '${guild.name} (#${guild.memberCount})'!` ); @@ -107,17 +107,17 @@ client.on('interactionCreate', async (interaction) => { const outputTime = new Date(); const executionTime = outputTime - inputTime; console.log( - `${new Date().toISOString().substring(11, 19)}: ${ + `${new Date().toISOString().substring(11, 19)}: Info: ${ interaction.guild.name - } (#${interaction.guild.memberCount})> Ran command '/${ + } (#${interaction.guild.memberCount})> Command '/${ interaction.commandName - }' successfully in ${executionTime} ms.` + }' executed in ${executionTime} ms.` ); } catch (error) { // log error to console with full object depth console.dir(error, { depth: null }); console.log( - `${new Date().toISOString().substring(11, 19)}: ${ + `${new Date().toISOString().substring(11, 19)}: Error: 🚨 ${ interaction.guild.name } (#${interaction.guild.memberCount})> Command '/${ interaction.commandName