From a94f2a50175b9f5b57e9bd79232130b7b588ab46 Mon Sep 17 00:00:00 2001 From: Christian Sauer Date: Sat, 17 Feb 2024 09:46:47 -0500 Subject: [PATCH] Update fetchFollowersCount to new Helix endpoint /users/follows/ is no more, and /channels/followers can be used to get a channel's follower count. --- src/libs/Twitch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Twitch.ts b/src/libs/Twitch.ts index ce408d5..32b4e06 100644 --- a/src/libs/Twitch.ts +++ b/src/libs/Twitch.ts @@ -677,7 +677,7 @@ export default class Twitch { * @return The total number of followers. */ public static async fetchFollowersCount(targetId: string) { - const response = await Twitch.fetch(TwitchApi.Helix, '/users/follows', { to_id: targetId }) + const response = await Twitch.fetch(TwitchApi.Helix, '/channels/followers', { broadcaster_id: targetId }) const relationships = (await response.json()) as RawRelationships return relationships.total