Skip to content

redleague/node-weeby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-weeby

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

NPM

Getting Started

Installing with NPM.

npm install node-weeby --save

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.

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

Functions

GIF

client.gif('type');

Word

client.word('type');