streamer-emotes 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +8 -8
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -268,20 +268,20 @@ const getStreamerEmotes = async (channelLogin, options) => {
268
268
  const data = {};
269
269
  let bttvPromise, ffzPromise, sevenTvPromise, twitchPromise;
270
270
  if (bttv || ffz || sevenTV) await getTwitchIdByLogin(channelLogin);
271
- if (bttv) bttvPromise = getBttvEmotes(channelLogin, { globals: typeof bttv === "boolean" ? true : bttv?.globals });
272
- if (ffz) ffzPromise = getFfzEmotes(channelLogin, { globals: typeof ffz === "boolean" ? true : ffz?.globals });
273
- if (sevenTV) sevenTvPromise = get7tvEmotes(channelLogin, { globals: typeof sevenTV === "boolean" ? true : sevenTV?.globals });
274
- if (twitch) twitchPromise = getTwitchEmotes(channelLogin, { globals: typeof twitch === "boolean" ? true : twitch?.globals });
271
+ if (bttv) bttvPromise = getBttvEmotes(channelLogin, { globals: typeof bttv === "boolean" ? true : bttv?.globals }).catch(() => null);
272
+ if (ffz) ffzPromise = getFfzEmotes(channelLogin, { globals: typeof ffz === "boolean" ? true : ffz?.globals }).catch(() => null);
273
+ if (sevenTV) sevenTvPromise = get7tvEmotes(channelLogin, { globals: typeof sevenTV === "boolean" ? true : sevenTV?.globals }).catch(() => null);
274
+ if (twitch) twitchPromise = getTwitchEmotes(channelLogin, { globals: typeof twitch === "boolean" ? true : twitch?.globals }).catch(() => null);
275
275
  const [bttvEmotes, ffzEmotes, sevenTvEmotes, twitchEmotes] = await Promise.all([
276
276
  bttvPromise,
277
277
  ffzPromise,
278
278
  sevenTvPromise,
279
279
  twitchPromise
280
280
  ]);
281
- if (bttv) data.bttv = bttvEmotes;
282
- if (ffz) data.ffz = ffzEmotes;
283
- if (sevenTV) data.sevenTV = sevenTvEmotes;
284
- if (twitch) data.twitch = twitchEmotes;
281
+ if (bttv && bttvEmotes) data.bttv = bttvEmotes;
282
+ if (ffz && ffzEmotes) data.ffz = ffzEmotes;
283
+ if (sevenTV && sevenTvEmotes) data.sevenTV = sevenTvEmotes;
284
+ if (twitch && twitchEmotes) data.twitch = twitchEmotes;
285
285
  return data;
286
286
  };
287
287
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "streamer-emotes",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "A library to get Twitch, BTTV, FFZ and 7TV emotes for a given Twitch channel.",
6
6
  "keywords": [
7
7
  "streamer",