Skip to content

[Tech Debt] Remove hardcoded Discord channel ID from MonthlyReportFormatter #274

@sonikro

Description

@sonikro

Problem

packages/providers/src/services/MonthlyReportFormatter.ts hardcodes a specific Discord channel ID inside the formatted report message:

return `@everyone
📊 **TF2-QuickServer | ${monthName} ${report.year} Metrics & Costs**
...

The channel ID 1365408843676520508 is a hardcoded infrastructure detail inside a formatter class. This means:

  1. Anyone self-hosting TF2-QuickServer will have a broken/wrong channel mention in their monthly report
  2. The formatter is coupled to a specific Discord server's channel

Fix

Remove or externalize the hardcoded channel mention. Options:

Option B: Accept an optional supportChannelId parameter in the format() method and only include the mention if provided:

format(report: MonthlyUsageReport, options?: { supportChannelId?: string }): string {
    const supportLine = options?.supportChannelId
        : '';
    // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTechnical debt items

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions