feat: add TikTok follower integration and reduce cache revalidation interval to one hour

This commit is contained in:
2026-06-21 23:58:57 +07:00 Unverified
parent a25f778f57
commit 4010cd1df4
5 changed files with 28 additions and 7 deletions
+3 -4
View File
@@ -1,6 +1,7 @@
import { getYoutubeSubscriberCount } from "./youtube";
import { getRobloxFollowerCount } from "./roblox";
import { getDiscordMemberCount } from "./discord";
import { getTiktokFollowerCount } from "./tiktok";
export interface FollowerCounts {
youtube: number | null;
@@ -15,15 +16,13 @@ export interface FollowerInfo {
}
export async function getFollowerCounts(): Promise<FollowerCounts> {
const [youtube, roblox, discord] = await Promise.all([
const [youtube, roblox, discord, tiktok] = await Promise.all([
getYoutubeSubscriberCount(),
getRobloxFollowerCount(),
getDiscordMemberCount(),
getTiktokFollowerCount(),
]);
const tiktokEnv = process.env.TIKTOK_FOLLOWERS;
const tiktok = tiktokEnv ? Number(tiktokEnv) : null;
return { youtube, roblox, discord, tiktok };
}