@mkody/twitch-emoticons 2.3.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,10 @@ jobs:
9
9
  - uses: actions/checkout@v2
10
10
  - uses: actions/setup-node@v2
11
11
  with:
12
- node-version: 12
12
+ node-version: 16
13
13
  - run: yarn
14
14
  - run: yarn lint
15
15
  - run: yarn test
16
+ env:
17
+ TWITCH_ID: ${{ secrets.TWITCH_ID }}
18
+ TWITCH_SECRET: ${{ secrets.TWITCH_SECRET }}
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # twitch-emoticons
2
2
 
3
- Get a Twitch channel's Twitch emotes, BTTV emotes, and FFZ emotes!
3
+ Gets Twitch, BTTV and FFZ emotes as well as parsing text to emotes!
4
4
 
5
5
  ### About this fork's 2.3.0+
6
6
  You must now use a Twitch user ID instead of the username to fetch user's emotes.
@@ -8,12 +8,11 @@ You can use [this page to quickly grab it](https://s.kdy.ch/twitchid/).
8
8
 
9
9
  _FFZ still supports names, but usage of the ID is recommended._
10
10
 
11
- ### Note about Twitch emotes
12
- We've seen twitchemotes.com's API returning "channel not found" at multiple occasions (as of early May 2021).
13
- A fallback system to a static json for the global emotes is in place, but if their service is down or not working you will not be able to fetch the list of emotes from a specific channel.
14
- If you have an alternative API or some quick code to get them from Twitch directly, feel free to share in Issue #8.
11
+ ### About this fork's 2.4.0+
12
+ You now need to use the official Twitch API to get emotes. For this you need to provide your client id and client secret.
13
+ To get a client and secret create a Twitch app [here](https://dev.twitch.tv/console/apps/create), it's free.
15
14
 
16
- BetterTTV and FrankerFaceZ are still working fine.
15
+ If you are only using BetterTTV and FrankerFaceZ you don't need to provide anything as they are independent from the Twitch API.
17
16
 
18
17
  ### Install
19
18
  ```sh
@@ -27,7 +26,10 @@ yarn add @mkody/twitch-emoticons
27
26
  ```js
28
27
  const { EmoteFetcher, EmoteParser } = require('@mkody/twitch-emoticons');
29
28
 
30
- const fetcher = new EmoteFetcher();
29
+ const clientId = '<your client id>';
30
+ const clientSecret = '<your client secret>';
31
+
32
+ const fetcher = new EmoteFetcher(clientId, clientSecret);
31
33
  const parser = new EmoteParser(fetcher, {
32
34
  type: 'markdown',
33
35
  match: /:(.+?):/g
@@ -52,6 +54,5 @@ fetcher.fetchTwitchEmotes(null).then(() => {
52
54
  - [Changelog](https://github.com/mkody/twitch-emoticons/releases)
53
55
 
54
56
  This library uses the following:
55
- - [Twitch Emotes API](https://twitchemotes.com/apidocs)
56
57
  - [BetterTTV API](https://betterttv.com/)
57
58
  - [FrankerFaceZ API](http://www.frankerfacez.com/developers)