Node.js library for getting global emotes as well as channel emotes.
It supports 4 providers:
- Install the library from Node Package Manager:
$ npm i emotelib
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"
});
// 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"));
console.log(await emotes.twitch.getGlobalEmotes());
console.log(await emotes.betterttv.getGlobalEmotes());
console.log(await emotes.frankerfacez.getGlobalEmotes());
console.log(await emotes.seventv.getGlobalEmotes());
- Axios (used to send requests to the API. In the future it will be replaced by the built-in XMLHttpRequest).