2.0.3-beta • Published 4 years ago
cafebot.js v2.0.3-beta
Cafebot.js
CAFEBOT.JS OFFICIAL WRAPPER
About
This is a wrapper for the api of the bot named Cafe, visit or invite it here this project will be maintained per every endpoint or bug found. please create an issue for us to track or fix.
Join official Cafe Discord here
Installation
NPM
npm i cafebot.js
Yarn
yarn add cafebot.js
Client
The Client for connecting to the API:
Client | Options |
---|---|
token | 'cafebot_token' |
disableLogs | true or false |
JS Setup
const { Client } = require('cafebot.js');
const c = new Client('token here');
Get a user profile
// ES6 promise
const { Client } = require('cafebot.js');
const cafe = new Client('token here').profile('discorduserid');
cafe.then(user => {
console.log(user);
//Will output all profile data
});
Check if a user has voted
// Asynchronous promise
const {Client} = require('cafebot.js');
// also removes logging
const cafe = new Client('token here', {disableLogs: true});
const Hello = await cafe.vote("discorduserid");
console.log(Hello);
//Will output a boolean, vote time, or an error.
There's more methods, but all of them follow the same style, and are appropriately not listed - for length purposes.
Known Bugs
Client | |
---|---|
None! |
2.0.3-beta
4 years ago
2.0.2-beta
4 years ago
2.0.1-beta-2
4 years ago
2.0.1-beta
4 years ago
2.0.1-beta-3
4 years ago
2.0.1-beta-4
4 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago