Updated list of commands to v4.3. Added groups & permissions. Added connections. Updated redemptions and actions to v4.3.

This commit is contained in:
Tom
2024-08-14 20:33:40 +00:00
parent 6548ce33e0
commit b92529d8c0
51 changed files with 3910 additions and 799 deletions

View File

@ -18,16 +18,21 @@ export async function GET(req: Request) {
if (!auth)
return new NextResponse("Bad Request", { status: 400 })
const redemptions = await axios.get("https://api.twitch.tv/helix/channel_points/custom_rewards?broadcaster_id=" + auth.broadcaster_id,
{
headers: {
"Client-Id": process.env.TWITCH_BOT_CLIENT_ID,
"Authorization": "Bearer " + auth.access_token
try {
const redemptions = await axios.get("https://api.twitch.tv/helix/channel_points/custom_rewards?broadcaster_id=" + auth.broadcaster_id,
{
headers: {
"Client-Id": process.env.TWITCH_BOT_CLIENT_ID,
"Authorization": "Bearer " + auth.access_token
}
}
}
)
)
return NextResponse.json(redemptions.data);
return NextResponse.json(redemptions.data);
} catch (error: any) {
console.error('Fetching Twitch channel redemptions:', error.response.data)
}
return NextResponse.json([]);
} catch (error) {
console.log("[REDEMPTIONS/ACTIONS]", error);
return new NextResponse("Internal Error", { status: 500 });