I'm getting TypeError: Image or Canvas expected when using the following code.
const resultbg = await fetch("https://cdn.discordapp.com/attachments/725418862346240070/747769058283225158/Capture.PNG ");
const bg = await resultbg.buffer();
let img = new Canvas(400,180)
.printImage(bg, 0, 0, 400, 180)
.setColor("#ffffff")
.setTextSize(27)
.addText(name, 10, 10) // name = mentioned user or author's username
.setTextSize(18) // rest of profile...```
Is the picture not in an acceptable format? What did I forgot to do?
Hello, I got a quick question:
I'm getting
TypeError: Image or Canvas expected
when using the following code.