@mkody/twitch-emoticons 2.6.2 → 2.7.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/README.md CHANGED
@@ -63,8 +63,10 @@ const clientSecret = '<your client secret>';
63
63
 
64
64
  const fetcher = new EmoteFetcher(clientId, clientSecret);
65
65
  const parser = new EmoteParser(fetcher, {
66
- template: '<img class="emote" alt="{name}" src="{link}">', // Custom HTML format
67
- match: /(\w+)+?/g // Match without :colons:
66
+ // Custom HTML format
67
+ template: '<img class="emote" alt="{name}" src="{link}">',
68
+ // Match without :colons:
69
+ match: /(\w+)+?/g
68
70
  });
69
71
 
70
72
  Promise.all([
@@ -80,16 +82,18 @@ Promise.all([
80
82
  fetcher.fetchSevenTVEmotes(),
81
83
  // 7TV channel
82
84
  fetcher.fetchSevenTVEmotes(channelId),
85
+ // FFZ global
86
+ fetcher.fetchFFZEmotes(),
83
87
  // FFZ channel
84
88
  fetcher.fetchFFZEmotes(channelId)
85
89
  ]).then(() => {
86
- const globalEmotes = parser.parse('EZ Clap way too easy LUL now for the last bost monkaS');
90
+ const globalEmotes = parser.parse('EZ Clap way too easy LUL now for the last boss monkaS LaterSooner');
87
91
  console.log(globalEmotes);
88
- // <img class="emote" alt="EZ" src="https://cdn.7tv.app/emote/6320bf2ad461b9ebf9413812/1x.webp"> <img class="emote" alt="Clap" src="https://cdn.7tv.app/emote/636b877aada75990352334c7/1x.webp"> way too easy <img class="emote" alt="LUL" src="https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/1.0"> now for the last bost <img class="emote" alt="monkaS" src="https://cdn.betterttv.net/emote/56e9f494fff3cc5c35e5287e/1x">
92
+ // <img class="emote" alt="EZ" src="https://cdn.7tv.app/emote/63071b80942ffb69e13d700f/1x.webp"> <img class="emote" alt="Clap" src="https://cdn.7tv.app/emote/62fc0a0c4a75fd54bd3520a9/1x.webp"> way too easy <img class="emote" alt="LUL" src="https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/1.0"> now for the last boss <img class="emote" alt="monkaS" src="https://cdn.betterttv.net/emote/56e9f494fff3cc5c35e5287e/1x.webp"> <img class="emote" alt="LaterSooner" src="https://cdn.frankerfacez.com/emote/149346/1">
89
93
 
90
94
  const channelEmotes = parser.parse('KEKW that was 3Head TeriPoint');
91
95
  console.log(channelEmotes);
92
- // <img class="emote" alt="KEKW" src="https://cdn.betterttv.net/emote/5e9c6c187e090362f8b0b9e8/1x"> that was <img class="emote" alt="3Head" src="https://cdn.frankerfacez.com/emote/274406/1"> <img class="emote" alt="TeriPoint" src="https://cdn.7tv.app/emote/61dc299b600369a98b38ebef/1x.webp">
96
+ // <img class="emote" alt="KEKW" src="https://cdn.betterttv.net/emote/5e9c6c187e090362f8b0b9e8/1x.webp"> that was <img class="emote" alt="3Head" src="https://cdn.frankerfacez.com/emote/274406/1"> <img class="emote" alt="TeriPoint" src="https://cdn.7tv.app/emote/61dc299b600369a98b38ebef/1x.webp">
93
97
  }).catch(err => {
94
98
  console.error('Error loading emotes...');
95
99
  console.error(err);
@@ -125,6 +129,7 @@ fetcher.fetchSevenTVEmotes(24377667, 'avif');
125
129
  - [Changelog](https://github.com/mkody/twitch-emoticons/releases)
126
130
 
127
131
  This library uses the following:
128
- - [BetterTTV API](https://betterttv.com/)
129
- - [FrankerFaceZ API](https://www.frankerfacez.com/developers)
130
- - [7TV API](https://7tv.app/)
132
+ - [Twurple](https://twurple.js.org/) and the [Twitch API](https://dev.twitch.tv/)
133
+ - [BetterTTV API](https://betterttv.com/developers/api)
134
+ - [FrankerFaceZ API](https://api.frankerfacez.com/docs/)
135
+ - [7TV API](https://7tv.io/)