mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-22 06:31:06 +01:00
feat: add logging
This commit is contained in:
parent
eff01b65de
commit
04d462ebb1
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue