From caafe6b34d889ce85fa19036531b4613ff24d5f8 Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Thu, 8 Jan 2026 16:42:14 +0100 Subject: [PATCH] refactor: update graphics paths --- bot/graphics/lootdrop.ts | 6 +++--- bot/graphics/studentID.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/graphics/lootdrop.ts b/bot/graphics/lootdrop.ts index 3aed18b..f31fe95 100644 --- a/bot/graphics/lootdrop.ts +++ b/bot/graphics/lootdrop.ts @@ -2,12 +2,12 @@ import { GlobalFonts, createCanvas, loadImage } from '@napi-rs/canvas'; import path from 'path'; // Register Fonts (same as studentID.ts) -const fontDir = path.join(process.cwd(), 'src', 'assets', 'fonts'); +const fontDir = path.join(process.cwd(), 'bot', 'assets', 'fonts'); GlobalFonts.registerFromPath(path.join(fontDir, 'IBMPlexSansCondensed-SemiBold.ttf'), 'IBMPlexSansCondensed-SemiBold'); GlobalFonts.registerFromPath(path.join(fontDir, 'IBMPlexMono-Bold.ttf'), 'IBMPlexMono-Bold'); export async function generateLootdropCard(amount: number, currency: string): Promise { - const templatePath = path.join(process.cwd(), 'src', 'assets', 'graphics', 'lootdrop', 'template.png'); + const templatePath = path.join(process.cwd(), 'bot', 'assets', 'graphics', 'lootdrop', 'template.png'); const template = await loadImage(templatePath); const canvas = createCanvas(template.width, template.height); @@ -50,7 +50,7 @@ export async function generateLootdropCard(amount: number, currency: string): Pr } export async function generateClaimedLootdropCard(amount: number, currency: string, username: string, avatarUrl: string): Promise { - const templatePath = path.join(process.cwd(), 'src', 'assets', 'graphics', 'lootdrop', 'template.png'); + const templatePath = path.join(process.cwd(), 'bot', 'assets', 'graphics', 'lootdrop', 'template.png'); const template = await loadImage(templatePath); const canvas = createCanvas(template.width, template.height); diff --git a/bot/graphics/studentID.ts b/bot/graphics/studentID.ts index 29fada2..ef76fda 100644 --- a/bot/graphics/studentID.ts +++ b/bot/graphics/studentID.ts @@ -3,7 +3,7 @@ import { levelingService } from '@shared/modules/leveling/leveling.service'; import path from 'path'; // Register Fonts -const fontDir = path.join(process.cwd(), 'src', 'assets', 'fonts'); +const fontDir = path.join(process.cwd(), 'bot', 'assets', 'fonts'); GlobalFonts.registerFromPath(path.join(fontDir, 'IBMPlexSansCondensed-SemiBold.ttf'), 'IBMPlexSansCondensed-SemiBold'); GlobalFonts.registerFromPath(path.join(fontDir, 'IBMPlexMono-Bold.ttf'), 'IBMPlexMono-Bold'); @@ -18,8 +18,8 @@ interface StudentCardData { } export async function generateStudentIdCard(data: StudentCardData): Promise { - const templatePath = path.join(process.cwd(), 'src', 'assets', 'graphics', 'studentID', 'template.png'); - const classTemplatePath = path.join(process.cwd(), 'src', 'assets', 'graphics', 'studentID', `Constellation-${data.className}.png`); + const templatePath = path.join(process.cwd(), 'bot', 'assets', 'graphics', 'studentID', 'template.png'); + const classTemplatePath = path.join(process.cwd(), 'bot', 'assets', 'graphics', 'studentID', `Constellation-${data.className}.png`); const template = await loadImage(templatePath); const classTemplate = await loadImage(classTemplatePath);