Skip to content

Queaxtra/captchaxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

captchaxt

A CAPTCHA module made for Discord bot projects.

✨ Updates

  • Canvas option has been added; with this option, you can turn the CAPTCHA codes you create into a picture and personalize them as you wish.
  • Minor bugs fixed.

🛠 Installation

You can download the module using NPM or PNPM.

npm i captchaxt | pnpm i captchaxt

📁 Usage

  • Creating a simple CAPTCHA;
const captchaxt = require('captchaxt');

captchaxt.createCaptcha({
    length: 10,
    type: 'string', // or number, default: string
    uppercase: true,
    canvasOptions: {
        enabled: true,
        textColor: 'white', // red, black, blue etc.
        backgroundColor: 'transparent', // gray, red, green etc.
        width: 1000,
        height: 500
    }
}).then(buffer => {
    console.log(buffer);
});

Image

  • Creating a simple math CAPTCHA.
const captchaxt = require('captchaxt');

captchaxt.mathCaptcha({
    level: "easy" // or medium, hard
}).then(captcha => {
    console.log(captcha);
})

Image

  • Creating a simple question-answer CAPTCHA.
const captchaxt = require('captchaxt');

captchaxt.answerCaptcha().then(captcha => {
    console.log(captcha);
})

Image

✨ Note

Please contact us if you have encountered a bug or error. https://t.me/unoxdevs