Use a small file for sub emotes fixes #140

This commit is contained in:
Zack Rauen 2019-02-11 23:53:29 -05:00
parent cc48d1a111
commit 7fcdc06828
2 changed files with 2 additions and 17 deletions

View File

@ -657,24 +657,9 @@ EmoteModule.prototype.init = async function () {
getOldData: (url, name) => { return {id: url.match(/\/([0-9]+)\//)[1], code: name, emoticon_set: 0, description: null}; }
},
TwitchSubscriber: {
url: "https://twitchemotes.com/api_cache/v3/subscriber.json",
backup: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_twitch_subscriber.json`,
url: `https://rauenzi.github.io/BetterDiscordApp/data/emotedata_twitch_subscriber.json`,
variable: "TwitchSubscriber",
oldVariable: "subEmotesTwitch",
parser: (data) => {
let emotes = {};
for (let c in data) {
let channel = data[c];
for (let e = 0, elen = channel.emotes.length; e < elen; e++) {
let emote = channel.emotes[e];
emotes[emote.code] = emote.id;
}
}
return emotes;
},
backupParser: (data) => {
return data;
},
getEmoteURL: (e) => `https://static-cdn.jtvnw.net/emoticons/v1/${e}/1.0`,
getOldData: (url) => url.match(/\/([0-9]+)\//)[1]
},

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long