@tixyel/streamelements 7.2.0 → 7.2.1

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/dist/index.d.ts CHANGED
@@ -2999,7 +2999,7 @@ declare class UtilsHelper {
2999
2999
  userId: string;
3000
3000
  name: string;
3001
3001
  broadcasterId?: string;
3002
- }, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<1 | 2 | 3>;
3002
+ }, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<3 | 1 | 2>;
3003
3003
  /**
3004
3004
  * Identifies a user based on the received event and session data, returning their ID, name, role, badges, and top status.
3005
3005
  * @param receivedEvent - The event received from the provider (Twitch or YouTube) containing user information.
package/dist/index.es.js CHANGED
@@ -9280,14 +9280,16 @@ var T = class {
9280
9280
  replaceEmotesWithHTML(e, t) {
9281
9281
  if (!t.length) return e;
9282
9282
  let n = "", r = 0;
9283
- return t.filter((e) => e.type !== "emoji").forEach((t) => {
9283
+ return t.filter((e) => e.type !== "emoji").sort((e, t) => e.start - t.start).forEach((t) => {
9284
9284
  if (t.start < r) return;
9285
9285
  n += e.substring(r, t.start);
9286
9286
  let i = Array.from({
9287
9287
  ...t.urls,
9288
9288
  length: 5
9289
9289
  }).slice(1).reverse().filter(Boolean)[0] || t.urls[1];
9290
- n += `<img src="${i}" alt="${t.name}" class="emote" style="width: auto; height: 1em; vertical-align: middle;" />`, r = t.end;
9290
+ n += `<img src="${i}" alt="${t.name}" class="emote" style="width: auto; height: 1em; vertical-align: middle;" />`;
9291
+ let a = t.start + t.name.length;
9292
+ r = t.end === a - 1 ? t.end + 1 : t.end;
9291
9293
  }), n += e.substring(r), n;
9292
9294
  }
9293
9295
  hasOnlyEmotes(e, t) {