@tixyel/streamelements 7.0.3 → 7.0.4
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 +4 -2
- package/dist/index.es.js +7 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -482,7 +482,8 @@ declare namespace Twitch {
|
|
|
482
482
|
click_url: string | null;
|
|
483
483
|
}>;
|
|
484
484
|
};
|
|
485
|
-
type
|
|
485
|
+
type CommonTags = 'no_video' | 'no_audio' | 'vip' | 'predictions' | 'lead_moderator' | 'moderator' | 'subscriber' | 'sub-gifter' | 'sub-gift-leader' | 'bits' | 'twitchbot' | 'staff' | 'admin' | 'partner' | 'turbo' | 'broadcaster' | 'hype-train' | 'bits' | 'bits-leader' | 'bot-badge' | 'founder' | 'admin' | 'extension' | 'game-developer' | 'global_mod' | 'artist-badge' | 'ambassador' | 'premium';
|
|
486
|
+
type tags = CommonTags | 'qsmp2' | 'jasontheween-7-day-survival' | 'support-a-streamer-ho26-badge' | 'twitch-recap-2025' | 'ugly-sweater' | 'fright-fest-2025' | 'gamerduo' | 'video-games-day' | 'twitch-intern-2022' | 'touch-grass' | 'twitchcon-referral-program-2025-chrome-star' | 'twitchcon-referral-program-2025-bleedpurple' | 'share-the-love' | 'gone-bananas' | 'twitchcon-2025---rotterdam' | 'clip-the-halls' | 'twitch-recap-2024' | 'subtember-2024' | 'twitch-intern-2024' | 'twitch-dj' | 'destiny-2-the-final-shape-streamer' | 'destiny-2-final-shape-raid-race' | 'twitchcon-2024---san-diego' | 'minecraft-15th-anniversary-celebration' | 'warcraft' | 'vga-champ-2017' | 'tyranny_1' | 'twitchconNA2023' | 'twitchconNA2020' | 'twitchconNA2022' | 'twitchconNA2019' | 'twitchconEU2023' | 'twitchconEU2022' | 'twitchcon2018' | 'twitchconAmsterdam2020' | 'twitchconEU2019' | 'twitchcon2017' | 'twitchcon-2024---rotterdam' | 'twitch-recap-2023' | 'twitch-intern-2023' | 'treasure-adventure-world_1' | 'titan-souls_1' | 'this-war-of-mine_1' | 'the-surge_2' | 'the-surge_1' | 'the-surge_3' | 'the-golden-predictor-of-the-game-awards-2023' | 'the-game-awards-2023' | 'superhot_1' | 'strafe_1' | 'streamer-awards-2024' | 'starbound_1' | 'samusoffer_beta' | 'rplace-2023' | 'rift_1' | 'raiden-v-directors-cut_1' | 'psychonauts_1' | 'overwatch-league-insider_2019B' | 'overwatch-league-insider_2019A' | 'okhlos_1' | 'overwatch-league-insider_2018B' | 'overwatch-league-insider_1' | 'kingdom-new-lands_1' | 'jackbox-party-pack_1' | 'innerspace_2' | 'innerspace_1' | 'hello_neighbor_1' | 'gold-pixel-heart' | 'heavy-bullets_1' | 'glitchcon2020' | 'glhf-pledge' | 'getting-over-it_2' | 'getting-over-it_1' | 'frozen-synapse_1' | 'frozen-cortext_1' | 'firewatch_1' | 'enter-the-gungeon_1' | 'duelyst_5' | 'duelyst_6' | 'duelyst_7' | 'duelyst_2' | 'duelyst_4' | 'duelyst_3' | 'duelyst_1' | 'devilian_1' | 'devil-may-cry-hd_4' | 'devil-may-cry-hd_3' | 'devil-may-cry-hd_2' | 'devil-may-cry-hd_1' | 'deceit_1' | 'darkest-dungeon_1' | 'cuphead_1' | 'clip-champ' | 'broken-age_1' | 'bubsy-the-woolies_1' | 'brawlhalla_1' | 'bits-charity' | 'battlechefbrigade_3' | 'battlerite_1' | 'battlechefbrigade_2' | 'battlechefbrigade_1' | 'axiom-verge_1' | 'anomaly-2_1' | 'anomaly-warzone-earth_1' | 'H1Z1_1' | '60-seconds_3' | '60-seconds_2' | '60-seconds_1' | '1979-revolution_1' | '10-years-as-twitch-staff' | '15-years-as-twitch-staff' | '5-years-as-twitch-staff' | 'aang' | 'alone' | 'anonymous-cheerer' | 'arc-raiders-launch-2025' | 'arcane-season-2-premiere' | 'battlefield-6' | 'bingbonglove' | 'black-ops-7-global-launch' | 'borderlands-4-badge---ripper' | 'borderlands-4-badge---vault-symbol' | 'bungie-foundation-ally' | 'bungie-foundation-supporter' | 'chatter-cs-go-2022' | 'clips-leader' | 'creator-cs-go-2022' | 'crimson-butterfly' | 'diablo-30th-anniversary' | 'diana' | 'ditto' | 'dragonscimmy' | 'dreamcon-2024' | 'elden-ring-recluse' | 'elden-ring-wylder' | 'eso_1' | 'evo-2025' | 'fallout-season-2-ghoul' | 'first-stand-2026-supporter' | 'first-stand-2026-viewer' | 'fischer' | 'frog-lantern' | 'gears-of-war-superfan-badge' | 'gingko-leaf' | 'gold-pixel-heart---together-for-good-24' | 'gp-explorer-3' | 'hornet' | 'hunt-crosses' | 'hypershot-celestial' | 'jeff-the-land-shark' | 'k4sen-con-2025' | 'kodama' | 'la-velada-iv' | 'la-velada-v-badge' | 'lamby' | 'league-of-legends-mid-season-invitational-2025---grey' | 'league-of-legends-mid-season-invitational-2025---purple' | 'legendus' | 'lol-worlds-2025' | 'lost-ark-anniversary' | 'low' | 'marathon-reveal-runner' | 'marathon-silkworm' | 'marathon-sub-burger' | 'mel' | 'moments' | 'mr-raccoon' | 'never-grave---witch-hat' | 'path-of-exile-2-badge' | 'pokemon-30th-anniversary' | 'pokemon-legends-z-a-chikorita' | 'pokemon-legends-z-a-tepig' | 'pokemon-legends-z-a-totodile' | 'power-rangers' | 'purple-noob' | 'purple-pixel-heart---together-for-good-24' | 'raging-wolf-helm' | 'raider-icon-badge' | 'rainbow-six-siege-x-10th-anniversary' | 'revedtv-stream-awards-2025' | 'ruby-pixel-heart---together-for-good-24' | 'rudy' | 'rustmas-2025' | 'sajam-slam-badge' | 'scampuss' | 'seeks-eye' | 'social-sharing' | 'sonic-racing-crossworlds' | 'speedons-5-badge' | 'stream-for-humanity-2-2025' | 'streamer-awards-tux' | 'subtember-2025' | 'superultracombo-2023' | 'survival-cup-4' | 'tft-paris-open' | 'the-deer' | 'the-first-descendant-badge' | 'the-man-without-fear' | 'the-onryos-mask' | 'together-for-good-25---good-badge' | 'together-for-good-25---gooder-badge' | 'together-for-good-25---goodest-badge' | 'together-for-good-25---wicked-dub-badge' | 'total-war-anniversary' | 'toxic-zombie' | 'twitchcon-2026-europe-row-houses' | 'twitchcon-2026-europe-windmill' | 'umbrella-corporation' | 'user-anniversary' | 'vct-paris-2025' | 'yellow-noob' | 'zevent-2024' | 'zevent25';
|
|
486
487
|
}
|
|
487
488
|
|
|
488
489
|
declare namespace TwitchEvents {
|
|
@@ -2573,6 +2574,7 @@ declare class MessageHelper {
|
|
|
2573
2574
|
* ```
|
|
2574
2575
|
*/
|
|
2575
2576
|
mapGlobalBadgeVersionAmount(type: Twitch.tags, variation: string | number): string;
|
|
2577
|
+
badgePriority: Twitch.tags[];
|
|
2576
2578
|
/**
|
|
2577
2579
|
* Generates badge data based on the provided badges and platform.
|
|
2578
2580
|
* @param badges - The badges to generate. Can be an array or a comma-separated string.
|
|
@@ -2984,7 +2986,7 @@ declare class UtilsHelper {
|
|
|
2984
2986
|
userId: string;
|
|
2985
2987
|
name: string;
|
|
2986
2988
|
broadcasterId?: string;
|
|
2987
|
-
}, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<
|
|
2989
|
+
}, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<3 | 1 | 2>;
|
|
2988
2990
|
/**
|
|
2989
2991
|
* Identifies a user based on the received event and session data, returning their ID, name, role, badges, and top status.
|
|
2990
2992
|
* @param receivedEvent - The event received from the provider (Twitch or YouTube) containing user information.
|
package/dist/index.es.js
CHANGED
|
@@ -9256,6 +9256,9 @@ var T = class {
|
|
|
9256
9256
|
return crypto.randomUUID();
|
|
9257
9257
|
}
|
|
9258
9258
|
}, E = class {
|
|
9259
|
+
constructor() {
|
|
9260
|
+
this.badgePriority = /* @__PURE__ */ "broadcaster.lead_moderator.moderator.vip.artist-badge.subscriber.sub-gift-leader.founder.sub-gifter.bits-leader.bits.admin.global_mod.staff.partner.ambassador.predictions.twitchbot.extension.game-developer.hype-train.bot-badge.turbo.premium.no_video.no_audio".split(".");
|
|
9261
|
+
}
|
|
9259
9262
|
findEmotesInText(e, t = w.emotes) {
|
|
9260
9263
|
let n = [];
|
|
9261
9264
|
return t.filter((e) => e.type !== "emoji").forEach((t) => {
|
|
@@ -9433,6 +9436,10 @@ var T = class {
|
|
|
9433
9436
|
!r.includes(e.id) && Array.isArray(r) ? r.push(e.id) : r = [e.id];
|
|
9434
9437
|
}
|
|
9435
9438
|
}
|
|
9439
|
+
r = r.sort((e, t) => {
|
|
9440
|
+
let n = this.badgePriority.indexOf(e), r = this.badgePriority.indexOf(t);
|
|
9441
|
+
return (n === -1 ? 2 ** 53 - 1 : n) - (r === -1 ? 2 ** 53 - 1 : r);
|
|
9442
|
+
});
|
|
9436
9443
|
var o;
|
|
9437
9444
|
switch (t) {
|
|
9438
9445
|
case "twitch": {
|