Skip to content

47PADO47/Venge-io.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Venge-io.js

A lightweight Node.js module for Venge.io private api 🔫

Warning âš 

venge.io devs recently changed their login mechanism and now it also requires the grecaptcha token. Therefore, I suggest logging in via hash.

Table Of Contents

Installation

    npm install venge-io.js

Example

    const { Venge } = require('venge-io.js');

    const venge = new Venge('USERNAME', 'PASSWORD', 'GRECAPTCHA_TOKEN');
    // Constructor variables are optional.

    (async () => {
        await venge.login('USERNAME', 'PASSWORD', 'GRECAPTCHA_TOKEN');
        // Variables are optional if already specified in constructor.

        // or you can login via hash
        venge.setHash('HASH');

        venge.getStatus()
        .then(data => {
            console.log(`There are ${data.online} players online`);
        });

        const balance = await venge.getCoinDetails();
        console.log(`Your balance is ${balance.balance}`);

        setTimeout(() => {
            venge.logout();
            process.exit();
        }, 3500);
    })();