From 04d462ebb138d0a8074493207ecd08d202306543 Mon Sep 17 00:00:00 2001 From: xHyroM Date: Thu, 20 Oct 2022 12:42:39 +0200 Subject: [PATCH] feat: add logging --- src/utils/discord.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/discord.ts b/src/utils/discord.ts index 42ac34b..63931d0 100644 --- a/src/utils/discord.ts +++ b/src/utils/discord.ts @@ -1,3 +1,5 @@ +import { Logger } from "./Logger"; + export const getDiscordGuildMembers = async() => { let oldId; const result: any[] = []; @@ -16,8 +18,12 @@ export const getDiscordGuildMembers = async() => { result.push(...members.map(m => ({ id: m.id, nickname: m.nick }))); oldId = members[members.length - 1].id; + + Logger.debug(`Fetching guild members - ${result.length}, ${oldId}`); } + Logger.debug(`All guild members has been fetched - ${result.length}`); + return result; }