Node.js wrapper for Weeby API, developed by Red League on behalf of NTM Development.
Installing with NPM.
npm install node-weeby --save
Found an issue while using this wrapper or have suggestions? Feel free to join the Red League Discord Server, send a bug report or a pull request.
node-weeby
requires an authorization token which will have to be obtained on the NTM Discord Server by messaging the Weeby API Bot. Please read more about this on the Weeby API Website.
Typescript:
import { WeebyAPI } from 'node-weeby';
const client: WeebyAPI = new WeebyAPI({ token: 'YOUR_TOKEN' });
/* without promise */
(async () => {
const pat = await client.gif('pat');
console.log(pat)
})();
/* with promise */
client.gif('akko').then(i => console.log(i));
Javascript:
const { WeebyAPI } = require('node-weeby')
const client = new WeebyAPI({ token: 'YOUR_TOKEN' });
/* without promise */
(async () => {
const pat = await client.gif('pat');
console.log(pat)
})();
/* with promise */
client.gif('akko').then(i => console.log(i));
client.gif('type');
client.word('type');