Skip to content

Commit 0215d36

Browse files
committed
chore: logs
1 parent 0c620db commit 0215d36

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/commands/deathbattle.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@ async function createBattleImage(
129129
const ctx = canvas.getContext("2d");
130130

131131
try {
132-
const background = await loadImage(
133-
path.join(__dirname, "..", "deathbattle.png")
134-
);
132+
const backgroundPath = path.join(process.cwd(), "dist", "deathbattle.png");
133+
console.log("Attempting to load background image from:", backgroundPath);
134+
console.log("Current working directory:", process.cwd());
135+
console.log("__dirname:", __dirname);
136+
137+
const background = await loadImage(backgroundPath);
138+
console.log("Successfully loaded background image!");
139+
135140
ctx.drawImage(background, 0, 0, 1920, 1080);
136141

137142
const avatar1 = await loadImage(

0 commit comments

Comments
 (0)