0.1.0 • Published 3 years ago

essentials-captcha v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

Essentials-Captcha

Installation

npm i --save essentials-captcha

Example

const essentials = require('essentials-captcha');

essentials()
.then(captcha => {
    console.log(captcha.url);       // image as url
    console.log(captcha.solution);  // solution as text
})

async function getCaptcha(){
    const captcha = await essentials();
    console.log(captcha.url);
    console.log(captcha.solution);
}

Options

const options = {
    level: 1            // 1 = 'new' generator | 2 = 'old' generator
    style: 'text'       // style of the captcha: 'text' | 'math'
    retry: 0            // times to retry on errors (1 is recommended)
    fetchImage: false   // automatically fetches the image to "Captcha.image"
}
const options = {
    fetchImage: true
}

const captcha = await essentials(options);
console.log(captcha.image);
require('fs').writeFileSync('captcha.png', captcha.image);

Informations

Original Essentials API Repository

API Website

Discord Server

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago