From ffa92bbd5f03b6b12de2bbc2a40fd02f09185200 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 17 Jan 2023 10:52:34 +0100 Subject: [PATCH] better startup logs --- src/events/client/ready.ts | 3 ++- src/utils/misc.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/client/ready.ts b/src/events/client/ready.ts index a72c0af..764a4bd 100644 --- a/src/events/client/ready.ts +++ b/src/events/client/ready.ts @@ -1,11 +1,12 @@ import { Client } from 'discord.js'; +import { logStart } from '../../utils/misc'; import { dbReminder, deleteReminder, infoReminder, OptionReminder, sendReminder, setTimeoutReminder, updateReminder } from '../../utils/reminder'; export const once = true; /** https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-ready */ export default async (client: Client) => { - console.log('Connected to Discord!'); + console.log(logStart('Connection', true)); // Restart all the timeout about reminders here new Promise((ok, ko) => { diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 2708b92..9dbc8b1 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -8,7 +8,7 @@ import { GuildMember } from 'discord.js'; */ export const logStart = (name: string, status: boolean) => { // TODO Handle precision about the error if status is false - return `> ${name} ${status === true ? '✅' : '❌'}`; + return `> ${name}\t${status === true ? '✅' : '❌'}`; }; /**