1.1.1 • Published 3 years ago

node-weeby v1.1.1

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

node-weeby

Node.js wrapper for Weeby API, developed by Red League on behalf of NTM Development.

Getting Started

Installing with NPM.

npm install node-weeby --save

Authentication

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.

Example Usage

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));

Support

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.

Functions

GIF

client.gif('type');

Word

client.word('type');