Works with Twitch, BTTV and FFZ emotes
Dead simple API - works seamlessly with TMI.js
Flexible results to fit every need
Checkout this Svelte demo app to see emoteTTV in action โน๏ธ
npm install emotettv
# or with yarn
yarn add emotettv
import { parseBadges, parseEmotes, ... } from 'emotettv';
๐จ Remember to always sanitize user messages! If your frontend library doesn't do that for you, I recommend using DOMPurify.
Returns the initial message as an array of words and emotes.
Parameters
- message
string
- Message string to parse - emotes
EmotePositions
- List of emote positions, like tmi.jstags.emotes
- channelId
string
- Twitch ID of the channel the message is from
Returns: Promise<Word[]
>
Returns an object with the user badges
Parameters
- badgesData
Badges
- List of the user badges, like tmi.jstags.badges
- channelId
string
- Twitch ID of the channel the message is from
Returns: Promise<ParsedBadges
>
git clone https://github.com/doceazedo/emotettv.git
cd emotettv
npm install # or yarn
npm run build # or yarn build
The emoteTTV project is licensed under the GPLv3 License.