fix alert volumes

This commit is contained in:
2025-09-28 15:03:22 +02:00
parent ec7fb705c8
commit e4cfa74130
5 changed files with 20 additions and 7 deletions

View File

@@ -54,13 +54,13 @@ import logger from "lib/logger";
const currentRedeems = new Map<string, string>;
await streamerApi.channelPoints.getCustomRewards(streamerId).then(a => a.map(b => currentRedeems.set(b.title, b.id)));
for (const [_, redeem] of Array.from(namedRedeems)) {
if (process.env.NODE_ENV !== 'production') continue; // If created with dev-app we won't be able to change it with prod app
const selection = currentRedeems.get(redeem.title);
if (selection) {
currentRedeems.delete(redeem.title);
idMap.set(redeem.name, selection);
activeRedeems.set(selection, redeem);
} else {
if (process.env.NODE_ENV !== 'production') continue; // If created with dev-app we won't be able to change it with prod app
const creation = await streamerApi.channelPoints.createCustomReward(streamerId, {
title: redeem.title,
prompt: redeem.prompt,