From dc6b428acb04160144af3a3f07c3ca5cd12b38d1 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sun, 7 Apr 2024 18:10:51 -0400 Subject: [PATCH] fix logging --- src/handlers/dynamicIcon.handler.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/handlers/dynamicIcon.handler.ts b/src/handlers/dynamicIcon.handler.ts index 2470c5a..8868beb 100644 --- a/src/handlers/dynamicIcon.handler.ts +++ b/src/handlers/dynamicIcon.handler.ts @@ -21,18 +21,20 @@ export const dynamicIconHandler: Handler = (client) => { client.on('messageCreate', async (message) => { if (message.content != 'start numismatics icon thingy please') return; if (!message.member?.permissions.has('Administrator')) { - message.reply('nuh uh'); + await message.reply('nuh uh'); return; } if (timeout) { - message.reply('it already started silly'); + await message.reply('it already started silly'); return; } - message.reply('ok!!'); + await message.reply('ok!!'); const updateIcon = async () => { const currentTime = Date.now() - startTime; const currentProgress = currentTime / totalTime; - console.log(currentProgress); + console.log( + `Current Progress at ${Date.now()} is ${currentProgress}` + ); message.guild?.setIcon( await stream2buffer(await generateIcon(currentProgress / 2)) ); @@ -40,8 +42,8 @@ export const dynamicIconHandler: Handler = (client) => { clearInterval(timeout); } }; - updateIcon(); - timeout = setInterval(updateIcon, 1800_000); + await updateIcon(); + timeout = setInterval(updateIcon, 3600_000); }); };