Skip to content

ilotterytea/EmoteLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Node.js library for receiving global Twitch emotes as well as Twitch channel emotes. Support for third-party providers is included.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published