Skip to content

Commit

Permalink
BetterTTV Emotes 3.3.23
Browse files Browse the repository at this point in the history
* Changed: Register with the new emote provider API.
  • Loading branch information
SirStendec committed Dec 3, 2024
1 parent 3bf0a9b commit 977c178
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions src/ffzap-bttv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class BetterTTV extends Addon {
onEnable() {
this.log.debug('FFZ:AP\'s BetterTTV Emotes module was enabled successfully.');

this.emotes.setProvider('addon--ffzap.betterttv', {
name: this.addon_manifest.name,
icon: this.addon_manifest.icon,
});

this.on('chat:room-add', this.roomAdd);
this.on('chat:room-remove', this.roomRemove);
this.on('chat:receive-message', this.onReceiveMessage);
Expand Down Expand Up @@ -264,11 +269,11 @@ class BetterTTV extends Addon {
}

addProBadge() {
this.removeProBadge();
const wanted = this.chat.context.get('ffzap.betterttv.pro_badges') && ! window.BetterTTV;

if (!this.chat.context.get('ffzap.betterttv.pro_badges')) return;

if (window.BetterTTV) return;
this.removeProBadge(!wanted);
if (!wanted)
return;

const badgeData = {
id: `bttv-pro`,
Expand All @@ -281,9 +286,9 @@ class BetterTTV extends Addon {
this.badges.loadBadgeData(this.getProBadgeID(), badgeData);
}

removeProBadge() {
removeProBadge(generate_css = true) {
this.badges.deleteBulk('addon.ffzap-bttv', this.getProBadgeID());
delete this.badges.badges[this.getProBadgeID()];
this.badges.removeBadge(this.getProBadgeID(), generate_css);
}

async addBadges(attempts = 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/ffzap-bttv/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"load_events": [
"chat-data"
],
"version": "3.3.22",
"version": "3.3.23",
"short_name": "FFZ:AP BTTV",
"name": "BetterTTV Emotes",
"author": "Lordmau5",
"description": "Adds BetterTTV Global Emotes, Channel Emotes and Pro functionality (badges and emotes).",
"website": "https://betterttv.com/",
"settings": "add_ons.better_ttv_emotes",
"created": "2019-09-12T15:31:59.000Z",
"updated": "2024-10-24T18:38:50.471Z"
"updated": "2024-12-03T21:23:02.654Z"
}

0 comments on commit 977c178

Please sign in to comment.