@mkody/twitch-emoticons 2.8.9 → 2.9.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/.nvmrc +1 -1
- package/dist/TwitchEmoticons.min.js +10 -10
- package/dist/TwitchEmoticons.min.js.map +4 -4
- package/docs/BTTVEmote.html +1 -1
- package/docs/Channel.html +1 -1
- package/docs/Collection.html +1 -1
- package/docs/Emote.html +1 -1
- package/docs/EmoteFetcher.html +1 -1
- package/docs/EmoteParser.html +1 -1
- package/docs/FFZEmote.html +1 -1
- package/docs/SevenTVEmote.html +1 -1
- package/docs/TwitchEmote.html +1 -1
- package/docs/index.html +2 -2
- package/docs/struct_BTTVEmote.js.html +1 -1
- package/docs/struct_Channel.js.html +1 -1
- package/docs/struct_Emote.js.html +1 -1
- package/docs/struct_EmoteFetcher.js.html +3 -3
- package/docs/struct_EmoteParser.js.html +1 -1
- package/docs/struct_FFZEmote.js.html +1 -1
- package/docs/struct_SevenTVEmote.js.html +12 -10
- package/docs/struct_TwitchEmote.js.html +1 -1
- package/docs/util_Collection.js.html +1 -1
- package/package.json +11 -11
- package/src/struct/EmoteFetcher.js +2 -2
- package/src/struct/SevenTVEmote.js +11 -9
- package/test/SevenTV.test.js +11 -10
- package/test/ToFromObject.test.js +2 -1
- package/test/__snapshots__/ToFromObject.test.js.snap +5 -5
package/docs/BTTVEmote.html
CHANGED
|
@@ -1519,7 +1519,7 @@ Will result in an Object representation of a BTTVEmote</p></li></ul></dd>
|
|
|
1519
1519
|
<br class="clear">
|
|
1520
1520
|
|
|
1521
1521
|
<footer>
|
|
1522
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
1522
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1523
1523
|
</footer>
|
|
1524
1524
|
|
|
1525
1525
|
<script>prettyPrint();</script>
|
package/docs/Channel.html
CHANGED
|
@@ -811,7 +811,7 @@ For the global channel, the ID will be null.</p>
|
|
|
811
811
|
<br class="clear">
|
|
812
812
|
|
|
813
813
|
<footer>
|
|
814
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
814
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
815
815
|
</footer>
|
|
816
816
|
|
|
817
817
|
<script>prettyPrint();</script>
|
package/docs/Collection.html
CHANGED
|
@@ -785,7 +785,7 @@ Same as <code>Array#map</code>.</p></li></ul></dd>
|
|
|
785
785
|
<br class="clear">
|
|
786
786
|
|
|
787
787
|
<footer>
|
|
788
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
788
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
789
789
|
</footer>
|
|
790
790
|
|
|
791
791
|
<script>prettyPrint();</script>
|
package/docs/Emote.html
CHANGED
|
@@ -789,7 +789,7 @@ Will result in an Object representation of an Emote</p></li></ul></dd>
|
|
|
789
789
|
<br class="clear">
|
|
790
790
|
|
|
791
791
|
<footer>
|
|
792
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
792
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
793
793
|
</footer>
|
|
794
794
|
|
|
795
795
|
<script>prettyPrint();</script>
|
package/docs/EmoteFetcher.html
CHANGED
|
@@ -3668,7 +3668,7 @@ Use <code>null</code> for the global emotes channel.</p></li></ul></dd>
|
|
|
3668
3668
|
<br class="clear">
|
|
3669
3669
|
|
|
3670
3670
|
<footer>
|
|
3671
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
3671
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
3672
3672
|
</footer>
|
|
3673
3673
|
|
|
3674
3674
|
<script>prettyPrint();</script>
|
package/docs/EmoteParser.html
CHANGED
|
@@ -799,7 +799,7 @@ Must be a global regex, with one capture group for the emote code.</p></td>
|
|
|
799
799
|
<br class="clear">
|
|
800
800
|
|
|
801
801
|
<footer>
|
|
802
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
802
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
803
803
|
</footer>
|
|
804
804
|
|
|
805
805
|
<script>prettyPrint();</script>
|
package/docs/FFZEmote.html
CHANGED
|
@@ -1673,7 +1673,7 @@ Will result in an Object representation of a FFZEmote</p></li></ul></dd>
|
|
|
1673
1673
|
<br class="clear">
|
|
1674
1674
|
|
|
1675
1675
|
<footer>
|
|
1676
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
1676
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1677
1677
|
</footer>
|
|
1678
1678
|
|
|
1679
1679
|
<script>prettyPrint();</script>
|
package/docs/SevenTVEmote.html
CHANGED
|
@@ -1583,7 +1583,7 @@ Will result in an Object representation of a SevenTVEmote</p></li></ul></dd>
|
|
|
1583
1583
|
<br class="clear">
|
|
1584
1584
|
|
|
1585
1585
|
<footer>
|
|
1586
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
1586
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1587
1587
|
</footer>
|
|
1588
1588
|
|
|
1589
1589
|
<script>prettyPrint();</script>
|
package/docs/TwitchEmote.html
CHANGED
|
@@ -1515,7 +1515,7 @@ Will result in an Object representation of a TwitchEmote</p></li></ul></dd>
|
|
|
1515
1515
|
<br class="clear">
|
|
1516
1516
|
|
|
1517
1517
|
<footer>
|
|
1518
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
1518
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
1519
1519
|
</footer>
|
|
1520
1520
|
|
|
1521
1521
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<section class="package">
|
|
47
|
-
<h3>@mkody/twitch-emoticons 2.
|
|
47
|
+
<h3>@mkody/twitch-emoticons 2.9.0</h3>
|
|
48
48
|
</section>
|
|
49
49
|
|
|
50
50
|
|
|
@@ -220,7 +220,7 @@ fetcher.fromObject(emotes);
|
|
|
220
220
|
<br class="clear">
|
|
221
221
|
|
|
222
222
|
<footer>
|
|
223
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
223
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
224
224
|
</footer>
|
|
225
225
|
|
|
226
226
|
<script>prettyPrint();</script>
|
|
@@ -149,7 +149,7 @@ module.exports = BTTVEmote;
|
|
|
149
149
|
<br class="clear">
|
|
150
150
|
|
|
151
151
|
<footer>
|
|
152
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
152
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
153
153
|
</footer>
|
|
154
154
|
|
|
155
155
|
<script>prettyPrint();</script>
|
|
@@ -119,7 +119,7 @@ module.exports = Channel;
|
|
|
119
119
|
<br class="clear">
|
|
120
120
|
|
|
121
121
|
<footer>
|
|
122
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
122
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
123
123
|
</footer>
|
|
124
124
|
|
|
125
125
|
<script>prettyPrint();</script>
|
|
@@ -145,7 +145,7 @@ module.exports = Emote;
|
|
|
145
145
|
<br class="clear">
|
|
146
146
|
|
|
147
147
|
<footer>
|
|
148
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
148
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
149
149
|
</footer>
|
|
150
150
|
|
|
151
151
|
<script>prettyPrint();</script>
|
|
@@ -357,12 +357,12 @@ class EmoteFetcher {
|
|
|
357
357
|
if ('emotes' in rawEmotes) {
|
|
358
358
|
// From an emote set (like "global")
|
|
359
359
|
for (const data of rawEmotes.emotes) {
|
|
360
|
-
this._cacheSevenTVEmote(channel, data
|
|
360
|
+
this._cacheSevenTVEmote(channel, data, format);
|
|
361
361
|
}
|
|
362
362
|
} else {
|
|
363
363
|
// From users
|
|
364
364
|
for (const data of rawEmotes.emote_set.emotes) {
|
|
365
|
-
this._cacheSevenTVEmote(channel, data
|
|
365
|
+
this._cacheSevenTVEmote(channel, data, format);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
|
|
@@ -414,7 +414,7 @@ module.exports = EmoteFetcher;
|
|
|
414
414
|
<br class="clear">
|
|
415
415
|
|
|
416
416
|
<footer>
|
|
417
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
417
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
418
418
|
</footer>
|
|
419
419
|
|
|
420
420
|
<script>prettyPrint();</script>
|
|
@@ -140,7 +140,7 @@ module.exports = EmoteParser;
|
|
|
140
140
|
<br class="clear">
|
|
141
141
|
|
|
142
142
|
<footer>
|
|
143
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
143
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
144
144
|
</footer>
|
|
145
145
|
|
|
146
146
|
<script>prettyPrint();</script>
|
|
@@ -172,7 +172,7 @@ module.exports = FFZEmote;
|
|
|
172
172
|
<br class="clear">
|
|
173
173
|
|
|
174
174
|
<footer>
|
|
175
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
175
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
176
176
|
</footer>
|
|
177
177
|
|
|
178
178
|
<script>prettyPrint();</script>
|
|
@@ -79,13 +79,13 @@ class SevenTVEmote extends Emote {
|
|
|
79
79
|
* The name of the emote creator's channel.
|
|
80
80
|
* @type {?string}
|
|
81
81
|
*/
|
|
82
|
-
this.ownerName = 'owner' in data ? data.owner.display_name : null;
|
|
82
|
+
this.ownerName = 'owner' in data.data ? data.data.owner.display_name : null;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Available image sizes.
|
|
86
86
|
* @type {string[]}
|
|
87
87
|
*/
|
|
88
|
-
this.sizes = data.host.files
|
|
88
|
+
this.sizes = data.data.host.files
|
|
89
89
|
.filter(el => el.format === this.channel.format.toUpperCase())
|
|
90
90
|
.map(el => el.name);
|
|
91
91
|
|
|
@@ -93,7 +93,7 @@ class SevenTVEmote extends Emote {
|
|
|
93
93
|
* If emote is animated.
|
|
94
94
|
* @type {boolean}
|
|
95
95
|
*/
|
|
96
|
-
this.animated = data.animated;
|
|
96
|
+
this.animated = data.data.animated;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* The image type of the emote.
|
|
@@ -139,12 +139,14 @@ class SevenTVEmote extends Emote {
|
|
|
139
139
|
{
|
|
140
140
|
code: emoteObject.code,
|
|
141
141
|
name: emoteObject.code,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
data: {
|
|
143
|
+
animated: emoteObject.animated,
|
|
144
|
+
owner: {
|
|
145
|
+
display_name: emoteObject.ownerName
|
|
146
|
+
},
|
|
147
|
+
host: {
|
|
148
|
+
files: sizes
|
|
149
|
+
}
|
|
148
150
|
}
|
|
149
151
|
});
|
|
150
152
|
}
|
|
@@ -165,7 +167,7 @@ module.exports = SevenTVEmote;
|
|
|
165
167
|
<br class="clear">
|
|
166
168
|
|
|
167
169
|
<footer>
|
|
168
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
170
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
169
171
|
</footer>
|
|
170
172
|
|
|
171
173
|
<script>prettyPrint();</script>
|
|
@@ -146,7 +146,7 @@ module.exports = TwitchEmote;
|
|
|
146
146
|
<br class="clear">
|
|
147
147
|
|
|
148
148
|
<footer>
|
|
149
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
149
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
150
150
|
</footer>
|
|
151
151
|
|
|
152
152
|
<script>prettyPrint();</script>
|
|
@@ -137,7 +137,7 @@ module.exports = Collection;
|
|
|
137
137
|
<br class="clear">
|
|
138
138
|
|
|
139
139
|
<footer>
|
|
140
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.
|
|
140
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
141
141
|
</footer>
|
|
142
142
|
|
|
143
143
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkody/twitch-emoticons",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "typings/index.d.ts",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@twurple/api": "^7.2.
|
|
30
|
-
"@twurple/auth": "^7.2.
|
|
31
|
-
"axios": "^1.7.
|
|
29
|
+
"@twurple/api": "^7.2.1",
|
|
30
|
+
"@twurple/auth": "^7.2.1",
|
|
31
|
+
"axios": "^1.7.9"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "^29.7.0",
|
|
35
35
|
"@microsoft/eslint-formatter-sarif": "^3.1.0",
|
|
36
36
|
"docdash": "^2.0.2",
|
|
37
|
-
"esbuild": "^0.24.
|
|
38
|
-
"eslint": "^9.
|
|
39
|
-
"eslint-plugin-jsdoc": "^50.
|
|
40
|
-
"globals": "^15.
|
|
37
|
+
"esbuild": "^0.24.2",
|
|
38
|
+
"eslint": "^9.17.0",
|
|
39
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
40
|
+
"globals": "^15.14.0",
|
|
41
41
|
"jest": "^29.7.0",
|
|
42
|
-
"jsdoc": "^4.0.
|
|
42
|
+
"jsdoc": "^4.0.4"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"all": "pnpm run lint && pnpm run test && pnpm run build && pnpm run docs",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"test": "test"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
64
|
+
"node": ">=18.0.0",
|
|
65
65
|
"pnpm": ">=9"
|
|
66
66
|
},
|
|
67
|
-
"packageManager": "pnpm@9.
|
|
67
|
+
"packageManager": "pnpm@9.15.2"
|
|
68
68
|
}
|
|
@@ -310,12 +310,12 @@ class EmoteFetcher {
|
|
|
310
310
|
if ('emotes' in rawEmotes) {
|
|
311
311
|
// From an emote set (like "global")
|
|
312
312
|
for (const data of rawEmotes.emotes) {
|
|
313
|
-
this._cacheSevenTVEmote(channel, data
|
|
313
|
+
this._cacheSevenTVEmote(channel, data, format);
|
|
314
314
|
}
|
|
315
315
|
} else {
|
|
316
316
|
// From users
|
|
317
317
|
for (const data of rawEmotes.emote_set.emotes) {
|
|
318
|
-
this._cacheSevenTVEmote(channel, data
|
|
318
|
+
this._cacheSevenTVEmote(channel, data, format);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
|
|
@@ -32,13 +32,13 @@ class SevenTVEmote extends Emote {
|
|
|
32
32
|
* The name of the emote creator's channel.
|
|
33
33
|
* @type {?string}
|
|
34
34
|
*/
|
|
35
|
-
this.ownerName = 'owner' in data ? data.owner.display_name : null;
|
|
35
|
+
this.ownerName = 'owner' in data.data ? data.data.owner.display_name : null;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Available image sizes.
|
|
39
39
|
* @type {string[]}
|
|
40
40
|
*/
|
|
41
|
-
this.sizes = data.host.files
|
|
41
|
+
this.sizes = data.data.host.files
|
|
42
42
|
.filter(el => el.format === this.channel.format.toUpperCase())
|
|
43
43
|
.map(el => el.name);
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ class SevenTVEmote extends Emote {
|
|
|
46
46
|
* If emote is animated.
|
|
47
47
|
* @type {boolean}
|
|
48
48
|
*/
|
|
49
|
-
this.animated = data.animated;
|
|
49
|
+
this.animated = data.data.animated;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* The image type of the emote.
|
|
@@ -92,12 +92,14 @@ class SevenTVEmote extends Emote {
|
|
|
92
92
|
{
|
|
93
93
|
code: emoteObject.code,
|
|
94
94
|
name: emoteObject.code,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
data: {
|
|
96
|
+
animated: emoteObject.animated,
|
|
97
|
+
owner: {
|
|
98
|
+
display_name: emoteObject.ownerName
|
|
99
|
+
},
|
|
100
|
+
host: {
|
|
101
|
+
files: sizes
|
|
102
|
+
}
|
|
101
103
|
}
|
|
102
104
|
});
|
|
103
105
|
}
|
package/test/SevenTV.test.js
CHANGED
|
@@ -15,12 +15,12 @@ describe('Test 7TV emotes', () => {
|
|
|
15
15
|
|
|
16
16
|
test('Get emote (EZ)', () => {
|
|
17
17
|
const emote = emoteFetcher.emotes.get('EZ');
|
|
18
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
18
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/01GCVYNF0G000D8RDSXFWM2E0J/3x.webp');
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
test('Parse string with emote (EZ)', () => {
|
|
22
22
|
const text = emoteParser.parse('This is a test string with :EZ: in it.');
|
|
23
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -37,12 +37,12 @@ describe('Test 7TV emotes', () => {
|
|
|
37
37
|
|
|
38
38
|
test('Get emote (Clap)', () => {
|
|
39
39
|
const emote = emoteFetcher.emotes.get('Clap');
|
|
40
|
-
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/
|
|
40
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/01GHE0JD4G000AV9TSJ0TJ6D67/3x.avif');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
test('Parse string with emote (Clap)', () => {
|
|
44
44
|
const text = emoteParser.parse('This is a test string with :Clap: in it.');
|
|
45
|
-
expect(text).toBe('This is a test string with .toBe('This is a test string with  in it.');
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
|
|
@@ -57,14 +57,15 @@ describe('Test 7TV emotes', () => {
|
|
|
57
57
|
expect(await emoteFetcher.fetchSevenTVEmotes(44317909)).toBeInstanceOf(Collection);
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
// YABE was picked as it has been renamed from "fubukiYabe" on this channel
|
|
61
|
+
test('Get emote (YABE)', () => {
|
|
62
|
+
const emote = emoteFetcher.emotes.get('YABE');
|
|
63
|
+
expect(emote.toLink(2)).toBe('https://cdn.7tv.app/emote/01FFNN7CG00009CAK0J14696HH/3x.webp');
|
|
63
64
|
});
|
|
64
65
|
|
|
65
|
-
test('Parse string with emote (
|
|
66
|
-
const text = emoteParser.parse('This is a test string with :
|
|
67
|
-
expect(text).toBe('This is a test string with  in it.');
|
|
68
69
|
});
|
|
69
70
|
});
|
|
70
71
|
});
|
|
@@ -48,7 +48,8 @@ describe('Test toObject', () => {
|
|
|
48
48
|
|
|
49
49
|
test('7TV User Emote', async() => {
|
|
50
50
|
await emoteFetcher.fetchSevenTVEmotes(44317909);
|
|
51
|
-
|
|
51
|
+
// YABE was picked as it has been renamed from "fubukiYabe" on this channel
|
|
52
|
+
expect(emoteFetcher.emotes.get('YABE').toObject()).toMatchSnapshot();
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
if (env.TWITCH_ID === undefined || env.TWITCH_SECRET === undefined
|
|
@@ -5,9 +5,9 @@ exports[`Test toObject 7TV Global Emote (AVIF) 1`] = `
|
|
|
5
5
|
"animated": false,
|
|
6
6
|
"channel_id": null,
|
|
7
7
|
"code": "EZ",
|
|
8
|
-
"id": "
|
|
8
|
+
"id": "01GCVYNF0G000D8RDSXFWM2E0J",
|
|
9
9
|
"imageType": "avif",
|
|
10
|
-
"ownerName": "
|
|
10
|
+
"ownerName": "TrippyColour",
|
|
11
11
|
"sizes": [
|
|
12
12
|
"1x.avif",
|
|
13
13
|
"2x.avif",
|
|
@@ -22,10 +22,10 @@ exports[`Test toObject 7TV User Emote 1`] = `
|
|
|
22
22
|
{
|
|
23
23
|
"animated": true,
|
|
24
24
|
"channel_id": 44317909,
|
|
25
|
-
"code": "
|
|
26
|
-
"id": "
|
|
25
|
+
"code": "YABE",
|
|
26
|
+
"id": "01FFNN7CG00009CAK0J14696HH",
|
|
27
27
|
"imageType": "webp",
|
|
28
|
-
"ownerName": "
|
|
28
|
+
"ownerName": "jenji333",
|
|
29
29
|
"sizes": [
|
|
30
30
|
"1x.webp",
|
|
31
31
|
"2x.webp",
|