@tixyel/streamelements 7.0.0 → 7.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.
package/dist/index.d.ts CHANGED
@@ -487,11 +487,11 @@ declare namespace Twitch {
487
487
 
488
488
  declare namespace TwitchEvents {
489
489
  namespace Message {
490
- export type Data = {
490
+ type Data = {
491
491
  listener: 'message';
492
492
  event: Event;
493
493
  };
494
- export type Event = {
494
+ type Event = {
495
495
  service: 'twitch';
496
496
  data: {
497
497
  time: number;
@@ -522,18 +522,11 @@ declare namespace TwitchEvents {
522
522
  isAction: boolean;
523
523
  userId: string;
524
524
  msgId: string;
525
- badges: Array<Badge>;
525
+ badges: Array<Twitch.badge>;
526
526
  emotes: Array<Emote>;
527
527
  };
528
528
  renderedText: string;
529
529
  };
530
- type Badge = {
531
- type: string;
532
- version: string;
533
- description: string;
534
- url: string;
535
- };
536
- export {};
537
530
  }
538
531
  namespace DeleteMessage {
539
532
  type Data = {
@@ -3085,7 +3078,7 @@ type IdentifyTwitchResult = {
3085
3078
  color: string;
3086
3079
  role: Twitch.tags;
3087
3080
  tags: Twitch.tags[];
3088
- badges: string;
3081
+ badges: Twitch.badge[];
3089
3082
  tier?: 1 | 2 | 3;
3090
3083
  top: TopType;
3091
3084
  };
@@ -3275,6 +3268,7 @@ declare class FakeUser {
3275
3268
  }
3276
3269
  interface FakeUserPoolOptions {
3277
3270
  id?: string;
3271
+ names?: string[];
3278
3272
  badges?: Twitch.tags[];
3279
3273
  limits?: {
3280
3274
  [key in Twitch.tags]?: number;
@@ -3294,7 +3288,7 @@ declare class FakeUserPool extends EventProvider<FakeUserPoolEvents> {
3294
3288
  private readonly byBadge;
3295
3289
  private static fixUser;
3296
3290
  private static getRandomSubTier;
3297
- constructor(names?: string[], options?: FakeUserPoolOptions);
3291
+ constructor(options?: FakeUserPoolOptions);
3298
3292
  private start;
3299
3293
  pick(): FakeUser | null;
3300
3294
  getByName(name: string): FakeUser | null;
package/dist/index.es.js CHANGED
@@ -10131,8 +10131,8 @@ var N = class {
10131
10131
  3e3: .1
10132
10132
  }) ?? "prime";
10133
10133
  }
10134
- constructor(e = w.names, t) {
10135
- super(), this.users = [], this.byId = /* @__PURE__ */ new Map(), this.byName = /* @__PURE__ */ new Map(), this.byBadge = /* @__PURE__ */ new Map(), this.users = this.start(e, t?.badges, t), this.id = t?.id ?? `fake_user_pool_${Math.random().toString(36).slice(2, 10)}`, this.byId = new Map(this.users.map((e) => [e.id, e])), this.byName = new Map(this.users.map((e) => [e.login, e])), this.byBadge = new Map(this.users.reduce((e, t) => {
10134
+ constructor(e) {
10135
+ super(), this.users = [], this.byId = /* @__PURE__ */ new Map(), this.byName = /* @__PURE__ */ new Map(), this.byBadge = /* @__PURE__ */ new Map(), this.id = e?.id || `fake_user_pool_${Math.random().toString(36).slice(2, 10)}`, this.users = this.start(e?.names || w.names, e?.badges, e), this.byId = new Map(this.users.map((e) => [e.id, e])), this.byName = new Map(this.users.map((e) => [e.login, e])), this.byBadge = new Map(this.users.reduce((e, t) => {
10136
10136
  for (let n of t.badges) {
10137
10137
  let r = e.get(n) ?? [];
10138
10138
  e.set(n, [...r, t]);
@@ -10379,7 +10379,7 @@ var N = class {
10379
10379
  color: e.displayColor,
10380
10380
  role: e.tags.badges.split(",")[0].split("/")[0],
10381
10381
  tags: e.tags.badges.split(",").map((e) => e.split("/")[0]),
10382
- badges: e.tags.badges,
10382
+ badges: e.badges,
10383
10383
  tier: e.tags.badges.includes("subscriber") ? i : void 0,
10384
10384
  top: r(e.displayName)
10385
10385
  };