Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 860 Bytes

README.md

File metadata and controls

45 lines (37 loc) · 860 Bytes

Note : versions earlier than [v1.0.2] only work for revolt.js@v6

Example:

const Revolt = require("revolt.js");
const client = new Revolt.Client();
const RevoltBots = require('revoltbots.js');
const api = new RevoltBots.Client("Your-RBL-API-Key-Here");

// Posting manually...
client.on("ready", ()=>{
	api.postStats(client).then(result => {
    		console.log(result)
	});

})

// Hourly AutoPost...
client.on("ready", ()=>{
	api.autopostStats(client).then(result => {
    		console.log(result)
	});
});

client.on("message", ()=>{
// ..
	api.hasVoted(client, "REVOLTUSERID").then(result => {
    		console.log(result)
	});

// ...
	api.getStats(client).then(result => {
    		console.log(result)
	});
// ...

	api.getVoted(client).then(result => {
    		console.log(result)
	});
// ..
})

client.loginBot("revolt.BOT-TOKEN_HERE")

WIP