Image captcha not show words
Le-Khuong opened this issue · 8 comments
Le-Khuong commented
im confusing why the captcha image not showing words heres the image
https://cdn.discordapp.com/attachments/888833092041715774/919229224085254164/Screen_Shot_2021-12-11_at_9.08.32_PM.png
Shashank3736 commented
We solved this in #31 Please check that issue first. If it doesn't work for you then show me the code also share the version of captcha-canvas you are using.
Le-Khuong commented
Le-Khuong commented
and my code:
const { CaptchaGenerator } = require("captcha-canvas");
const {MessageAttachment} = require("discord.js")
const captcha = new CaptchaGenerator()
.setDimension(150, 450)
.setCaptcha({color: '#1DAEEF'})
.setDecoy({opacity: 0.5})
.setTrace({color: '#1DAEEF'});
const captchaImageData = captcha.generateSync();
const captAttach = new MessageAttachment(captchaImageData , `captcha.png`)
message.channel.send(captAttach )
Shashank3736 commented
Your system must support skia-canvas
try to install fontconfig
in your system then try. Which OS you are using btw?
Le-Khuong commented
im using repl
Le-Khuong commented
also i have install skia-canvas and still not work
Shashank3736 commented
repl have some issues with skia-canvas in issue #31 the user have the same issues because he is using repl too.
Le-Khuong commented
oh ok thanks