@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.
- package/.github/workflows/yarn-test.yml +4 -1
- package/README.md +9 -8
- package/docs/BTTVEmote.html +1191 -1191
- package/docs/Channel.html +700 -700
- package/docs/Collection.html +791 -791
- package/docs/Emote.html +768 -768
- package/docs/EmoteFetcher.html +2075 -1940
- package/docs/EmoteParser.html +792 -792
- package/docs/FFZEmote.html +1263 -1263
- package/docs/TwitchEmote.html +1189 -1189
- package/docs/index.html +132 -131
- package/docs/struct_BTTVEmote.js.html +69 -69
- package/docs/struct_Channel.js.html +69 -69
- package/docs/struct_Emote.js.html +69 -69
- package/docs/struct_EmoteFetcher.js.html +94 -86
- package/docs/struct_EmoteParser.js.html +69 -69
- package/docs/struct_FFZEmote.js.html +69 -69
- package/docs/struct_TwitchEmote.js.html +69 -69
- package/docs/util_Collection.js.html +69 -69
- package/package.json +16 -12
- package/src/struct/EmoteFetcher.js +26 -18
- package/src/util/Constants.js +1 -4
- package/test/index.js +106 -25
- package/typings/index.d.ts +2 -0
|
@@ -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
|
+
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
|
-
|
|
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
|
-
###
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
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
|
|
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)
|