This commit is contained in:
2025-06-30 21:34:13 +01:00
parent 57f5ae6d3a
commit b8518358b5

View File

@ -2,7 +2,7 @@ import { createHmac, timingSafeEqual } from "node:crypto";
import type { RequestHandler } from "@sveltejs/kit";
import { HASH_SECRET } from "$env/static/private";
import { twitchChallengeEvent, twitchFollowEvent } from "$lib/twitch";
import { client } from "$lib";
import { client, followerSubject } from "$lib";
const getHmacMessage = (request: Request, body: string): string => {
return (
request.headers.get(TWITCH_MESSAGE_ID)! +
@ -55,6 +55,7 @@ export const fallback: RequestHandler = async ({ request }) => {
const { user_name } = event.data.event;
followerSubject.next(user_name);
client.setRave(10_000);
console.log(`${user_name} has just subscribed`);