emotelib
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

EmoteLib
zulul vi von

Node.js library for getting global emotes as well as channel emotes.
It supports 4 providers:

Installation guide:

  1. Install the library from Node Package Manager:
$ npm i emotelib

Usage:

Initialization:

import EmoteLib from "emotelib";

// "client_id" and "access_token" are needed to convert the username into a user ID.
const emotes = new EmoteLib({
    client_id: "123456789abcdef",
    access_token: "123456789abcdef"
});

Get the channel emotes:

// Getting the channel emotes by name:
console.log(await emotes.twitch.getChannelEmotes("ilotterytea"));

console.log(await emotes.betterttv.getChannelEmotes("ilotterytea"));

console.log(await emotes.frankerfacez.getChannelEmotes("ilotterytea"));

console.log(await emotes.seventv.getChannelEmotes("ilotterytea"));

// Also, you can get the channel emotes by user ID:
// NOTE: Entering the user ID as a number will cause an error. Make it a string.
console.log(await emotes.twitch.getChannelEmotes("191400264"));

console.log(await emotes.betterttv.getChannelEmotes("191400264"));

console.log(await emotes.frankerfacez.getChannelEmotes("191400264"));

console.log(await emotes.seventv.getChannelEmotes("191400264"));

Get the global emotes:

console.log(await emotes.twitch.getGlobalEmotes());

console.log(await emotes.betterttv.getGlobalEmotes());

console.log(await emotes.frankerfacez.getGlobalEmotes());

console.log(await emotes.seventv.getGlobalEmotes());

Dependencies:

  • Axios (used to send requests to the API. In the future it will be replaced by the built-in XMLHttpRequest).

Package Sidebar

Install

npm i emotelib

Weekly Downloads

0

Version

1.0.2

License

Apache-2.0

Unpacked Size

63 kB

Total Files

28

Last publish

Collaborators

  • notdankenough