From ebc8e716e05a8e9a0ba81cef45093ff6f8e4332e Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Fri, 23 Dec 2022 15:27:02 +1100 Subject: [PATCH] send notification upon dailyMsgs update --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 43b337e..93b01b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -163,6 +163,7 @@ setInterval(async()=>{ } dailyMsgs.push([formattedDate, total]); fs.writeFileSync(__dirname + '/database/dailyMsgs.json', JSON.stringify(dailyMsgs)) - console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`) + console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`); + (client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel).send(`:pencil: Pushed \`[${formattedDate}, ${total}]\` to `) } }, 5000)