From 5f45c76657c51a4e92fd2c98d763c4d41f69be39 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 7 Apr 2025 17:24:28 +1000 Subject: [PATCH] fixed 7tv requirement --- public/script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 013992b..98e8690 100644 --- a/public/script.js +++ b/public/script.js @@ -45,7 +45,10 @@ class ChatApp { async fetch7TVEmotes(userId) { try { const response = await fetch(`https://7tv.io/v3/users/twitch/${userId}`); - if (!response.ok) throw new Error(`Error fetching 7TV emotes: ${response.status}`); + if (!response.ok) { + console.warn(`7TV emotes fetch failed with status ${response.status}. Continuing without 7TV emotes.`); + return {}; + } const emotesData = await response.json(); if (!emotesData?.emote_set?.emotes) return {};