https://github.com/doceazedo/emotettv
đŦ A Twitch (BTTV, FFZ & 7TV) emotes and badges parser - built with TMI.js in mind
https://github.com/doceazedo/emotettv
7tv bttv emotes ffz javascript library parser tmi tmijs twitch twurple typescript
Last synced: 12 days ago
JSON representation
đŦ A Twitch (BTTV, FFZ & 7TV) emotes and badges parser - built with TMI.js in mind
- Host: GitHub
- URL: https://github.com/doceazedo/emotettv
- Owner: doceazedo
- Created: 2022-03-03T03:19:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T16:57:11.000Z (about 2 years ago)
- Last Synced: 2025-08-09T05:34:51.153Z (6 months ago)
- Topics: 7tv, bttv, emotes, ffz, javascript, library, parser, tmi, tmijs, twitch, twurple, typescript
- Language: TypeScript
- Homepage: https://emotettv.gitbook.io
- Size: 215 KB
- Stars: 25
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
emoteTTV
[](https://www.npmjs.com/package/emotettv)
[](https://packagephobia.com/result?p=emotettv)
[](https://www.npmjs.com/package/emotettv)
[](https://snyk.io/test/npm/emotettv)
[](/LICENSE)
-
Supports Twitch, BTTV, FFZ and 7TV emotes and badges
-
Dead simple API â works seamlessly with TMI.js and Twurple
-
Works out of the box â no authentication needed
-
Flexible outputs to fit every need
## Demo
Checkout this [demo app](https://emotettv.gitbook.io/emotettv/examples) to see emoteTTV in action! âšī¸
## Basic usage
```js
import { parseEmotes } from "emotettv";
const parsed = await parseEmotes("Hello emotettv! D:");
console.log(parsed.toHTML());
// > Hello emotettv!
```
If you're using [TMI.js](https://github.com/tmijs/tmi.js), you can pass your tags directly to emoteTTV:
```js
import { parseBadges, parseEmotes } from "emotettv";
import tmi from "tmi.js";
const client = new tmi.Client({
channels: ["doceazedo911"],
});
const options = {
channelId: "98776633",
};
client.connect();
client.on("message", async (channel, tags, text, self) => {
const badges = await parseBadges(tags.badges, tags.username, options);
const message = await parseEmotes(text, tags.emotes, options);
const htmlBadges = badges.toHTML();
const htmlMessage = message.toHTML();
const displayName = tags["display-name"];
document.body.innerHTML = `${htmlBadges} ${displayName}: ${htmlMessage}`;
});
```
## Docs
Check more examples and API reference on the [emoteTTV docs](https://emotettv.gitbook.io).
## License
The emoteTTV project is licensed under the [GPLv3 License](./LICENSE).