Giter Site home page Giter Site logo

luiz21goncalves / emotettv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doceazedo/emotettv

0.0 0.0 0.0 30 KB

๐Ÿ’ฌ A Twitch (BTTV and FFZ) emotes and badges parser - built with tmi.js in mind

Home Page: https://npmjs.com/package/emotettv

License: GNU General Public License v3.0

JavaScript 4.22% TypeScript 95.78%

emotettv's Introduction

emoteTTV

npm install size downloads snyk snyk

  • Works with Twitch, BTTV and FFZ emotes
  • Dead simple API - works seamlessly with TMI.js
  • Flexible results to fit every need

Demo

Checkout this Svelte demo app to see emoteTTV in action โ›น๏ธ

Installation

npm install emotettv
# or with yarn
yarn add emotettv
import { parseBadges, parseEmotes, ... } from 'emotettv';

Usage

๐Ÿšจ Remember to always sanitize user messages! If your frontend library doesn't do that for you, I recommend using DOMPurify.

parseEmotes(...)

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.js tags.emotes
  • channelId string - Twitch ID of the channel the message is from

Returns: Promise<Word[]>

parseBadges(...)

Returns an object with the user badges

Parameters

  • badgesData Badges - List of the user badges, like tmi.js tags.badges
  • channelId string - Twitch ID of the channel the message is from

Returns: Promise<ParsedBadges>

Building

git clone https://github.com/doceazedo/emotettv.git
cd emotettv
npm install # or yarn
npm run build # or yarn build

License

The emoteTTV project is licensed under the GPLv3 License.

emotettv's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.