@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/test/index.js CHANGED
@@ -84,9 +84,9 @@ Promise.all([
84
84
  ]).then(() => {
85
85
  const text = bttvParser.parse(':SourPls:\n:tppUrn:\n:MODS:');
86
86
  assert.strictEqual(text, [
87
- '![SourPls](https://cdn.betterttv.net/emote/566ca38765dbbdab32ec0560/1x "SourPls")',
88
- '![tppUrn](https://cdn.betterttv.net/emote/5f5f7d5f68d9d86c020e8672/1x "tppUrn")',
89
- '![MODS](https://cdn.betterttv.net/emote/5f2c4f9e65fe924464ef6d61/1x "MODS")'
87
+ '![SourPls](https://cdn.betterttv.net/emote/566ca38765dbbdab32ec0560/1x.webp "SourPls")',
88
+ '![tppUrn](https://cdn.betterttv.net/emote/5f5f7d5f68d9d86c020e8672/1x.webp "tppUrn")',
89
+ '![MODS](https://cdn.betterttv.net/emote/5f2c4f9e65fe924464ef6d61/1x.webp "MODS")'
90
90
  ].join('\n'));
91
91
  }).then(() => {
92
92
  console.log('BTTV emotes test was successful.');
@@ -101,11 +101,15 @@ Promise.all([
101
101
  *
102
102
  * Tests:
103
103
  * - Fetch emotes
104
- * - FFZ Channel (sylux98)
104
+ * - FFZ Global
105
+ * - FFZ Channel (0kody)
105
106
  * - FFZ Channel (shizuka_natsume)
106
107
  * - Parse to Markdown
107
- * - FFZ emote from user name (AWOOO)
108
- * - FFZ emote from user ID (SanaeSip)
108
+ * - FFZ Global emote (CatBag)
109
+ * - FFZ Channel emote (5Head)
110
+ * - FFZ Channel animated emote (MikuSway)
111
+ * - FFZ Channel emote (SanaeSip)
112
+ * - FFZ modifier (ffzHyper)
109
113
  */
110
114
  const ffzFetcher = new EmoteFetcher();
111
115
  const ffzParser = new EmoteParser(ffzFetcher, {
@@ -114,13 +118,17 @@ const ffzParser = new EmoteParser(ffzFetcher, {
114
118
  });
115
119
 
116
120
  Promise.all([
117
- ffzFetcher.fetchFFZEmotes(21490561),
121
+ ffzFetcher.fetchFFZEmotes(),
122
+ ffzFetcher.fetchFFZEmotes(44317909),
118
123
  ffzFetcher.fetchFFZEmotes(13638332)
119
124
  ]).then(() => {
120
- const text = ffzParser.parse(':AWOOO:\n:SanaeSip:');
125
+ const text = ffzParser.parse(':CatBag:\n:5Head:\n:MikuSway:\n:SanaeSip: :ffzHyper:');
121
126
  assert.strictEqual(text, [
122
- '![AWOOO](https://cdn.frankerfacez.com/emote/67/1 "AWOOO")',
123
- '![SanaeSip](https://cdn.frankerfacez.com/emote/305078/1 "SanaeSip")'
127
+ '![CatBag](https://cdn.frankerfacez.com/emote/25927/1 "CatBag")',
128
+ '![5Head](https://cdn.frankerfacez.com/emote/239504/1 "5Head")',
129
+ '![MikuSway](https://cdn.frankerfacez.com/emote/723102/animated/1.webp "MikuSway")',
130
+ // Note the trailing space as ffZHyper is removed but not the space before
131
+ '![SanaeSip](https://cdn.frankerfacez.com/emote/305078/1 "SanaeSip") '
124
132
  ].join('\n'));
125
133
  }).then(() => {
126
134
  console.log('FFZ emotes test was successful.');
@@ -47,7 +47,8 @@ declare module '@mkody/twitch-emoticons' {
47
47
  public constructor(channel: Channel, id: string, data: object);
48
48
 
49
49
  public set?: string;
50
- public imageType: string;
50
+ public animated: boolean;
51
+ public imageType: 'png' | 'gif';
51
52
  public readonly owner: Channel;
52
53
 
53
54
  public toLink(size: number): string;
@@ -57,7 +58,8 @@ declare module '@mkody/twitch-emoticons' {
57
58
  public constructor(channel: Channel, id: string, data: any);
58
59
 
59
60
  public ownerName: string;
60
- public imageType: string;
61
+ public animated: boolean;
62
+ public imageType: 'webp';
61
63
  public readonly owner?: Channel;
62
64
 
63
65
  public toLink(size: number): string;
@@ -68,7 +70,9 @@ declare module '@mkody/twitch-emoticons' {
68
70
 
69
71
  public ownerName: string;
70
72
  public sizes: string[];
71
- public imageType: string;
73
+ public animated: boolean;
74
+ public imageType: 'png' | 'webp';
75
+ public modifier: boolean;
72
76
  public readonly owner?: Channel;
73
77
 
74
78
  public toLink(size: number): string;
@@ -79,7 +83,8 @@ declare module '@mkody/twitch-emoticons' {
79
83
 
80
84
  public ownerName: string;
81
85
  public sizes: string[];
82
- public imageType: string;
86
+ public animated: boolean;
87
+ public imageType: 'webp' | 'avif';
83
88
  public readonly owner?: Channel;
84
89
 
85
90
  public toLink(size: number): string;