From f838a8966388bc1b47e5fe7dc4ae564394f291b7 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Tue, 7 Oct 2025 17:40:19 -0700 Subject: [PATCH] feat: user-provided logger --- src/index.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index 30cd425..50d9f77 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,8 +4,8 @@ * @author Naomi Carrigan */ -import { Logger } from "@nhcarrigan/logger"; import { scheduleJob, type Job } from "node-schedule"; +import type { Logger } from "@nhcarrigan/logger"; import type { Events, Client } from "discord.js"; // eslint-disable-next-line complexity, max-lines-per-function, max-statements -- Justified @@ -71,21 +71,17 @@ const flatten = ( * A class for logging Discord bot analytics. */ export class DiscordAnalytics { - private readonly logger: Logger; - private job: Job | null = null; + private job: Job | null = null; /** * Creates a new instance of the DiscordAnalytics class. * @param client -- The Discord client to monitor. - * @param name -- The name of the application. - * @param logToken -- Auth token for our logging service. + * @param logger -- Instance of @nhcarrigan/logger to use for logging. */ public constructor( private readonly client: Client, - name: string, - logToken: string, + private readonly logger: Logger, ) { - this.logger = new Logger(name, logToken); } /**