1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 02:16:54 +00:00
* Added: Support for bits tier emote rewards.
* Fixed: Stop casting Twitch emote IDs to numbers. Bits reward emotes use hexadecimal IDs prefixed with `emotesv2_`.
This commit is contained in:
SirStendec 2019-12-12 18:44:19 -05:00
parent 5f27045b9f
commit 3ff9895713
7 changed files with 139 additions and 92 deletions

View file

@ -1036,7 +1036,7 @@ export const AddonEmotes = {
}
if ( provider === 'twitch' ) {
emote_id = parseInt(ds.id, 10);
emote_id = ds.id;
const set_id = hide_source ? null : await this.emotes.getTwitchEmoteSet(emote_id),
emote_set = set_id != null && await this.emotes.getTwitchSetChannel(set_id);
@ -1048,7 +1048,15 @@ export const AddonEmotes = {
if ( type === EmoteTypes.Global )
source = this.i18n.t('emote.global', 'Twitch Global');
else if ( type === EmoteTypes.Prime || type === EmoteTypes.Turbo )
else if ( type === EmoteTypes.BitsTier ) {
source = this.i18n.t('emote.bits', 'Twitch Bits Reward');
if ( emote_set.owner?.login )
source = this.i18n.t('emote.bits-owner', '{source}\nChannel: {channel}', {
source,
channel: emote_set.owner.displayName || emote_set.owner.login
});
} else if ( type === EmoteTypes.Prime || type === EmoteTypes.Turbo )
source = this.i18n.t('emote.prime', 'Twitch Prime');
else if ( type === EmoteTypes.LimitedTime )