3.0.0 • Published 3 years ago

tcapi.js v3.0.0

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

TCAPI.JS

An API wrapper for topcord.xyz

npm

Usage

Sending Stats

const TCAPI = require('tcapi.js');
const tcapi = new TCAPI('tcapi_token',{}, client);

tcapi.on('success', () => {
  console.log('Your bots stats have been posted');
});

tcapi.on('error', (e) => {
  console.log(`Error: ${e}`);
});

Receiving Votes

const TCAPI = require('tcapi.js');
const tcapi = new TCAPI('tcapi_token', {port: 5000});

tcapi.webhook.on('listening', (info) => {
  console.log(`Listening on port: ${info.port} and on path: ${info.path}`);
});

tcapi.webhook.on('vote', (info) => {
  console.log(`${info.userID} voted at ${info.date}`);
});
3.0.0

3 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

1.1.0

4 years ago