Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "7TV",
"description": "Improve your viewing experience on Twitch & YouTube with new features, emotes, vanity and performance.",
"private": true,
"version": "3.0.9",
"version": "3.0.10",
"dev_version": "1.0",
"scripts": {
"start": "NODE_ENV=dev yarn build:dev && NODE_ENV=dev vite --mode dev",
Expand Down
16 changes: 8 additions & 8 deletions src/worker/worker.http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ export class WorkerHttp {
// setup fetching promises
const userPromise = seventv.loadUserConnection(port.platform ?? "TWITCH", channel.id).catch(() => void 0);

const promises = (
[
["7TV", userPromise.then((es) => (es ? es.emote_set : null)).catch(() => void 0)],
["FFZ", frankerfacez.loadUserEmoteSet(channel.id).catch(() => void 0)],
["BTTV", betterttv.loadUserEmoteSet(channel.id).catch(() => void 0)],
] as [SevenTV.Provider, Promise<SevenTV.EmoteSet>][]
).filter(([p]) => port.providers.has(p));
const promises = [
["7TV", () => userPromise.then((es) => (es ? es.emote_set : null)).catch(() => void 0)],
["FFZ", () => frankerfacez.loadUserEmoteSet(channel.id).catch(() => void 0)],
["BTTV", () => betterttv.loadUserEmoteSet(channel.id).catch(() => void 0)],
] as [SevenTV.Provider, () => Promise<SevenTV.EmoteSet>][];

const onResult = async (set: SevenTV.EmoteSet) => {
if (!set) return;
Expand All @@ -131,7 +129,9 @@ export class WorkerHttp {
// iterate results and store sets to DB
const sets = [] as SevenTV.EmoteSet[];
for (const [provider, setP] of promises) {
const set = await setP.catch((err) =>
if (!port.providers.has(provider)) continue;

const set = await setP().catch((err) =>
this.driver.log.error(
`<Net/Http> failed to load emote set from provider ${provider} in #${channel.username}`,
err,
Expand Down