Each redeem plays one of its enabled variations, picked at random by rarity
(<% for (const [k, r] of Object.entries(rarity)) { %><%= r.label %> <%= r.weight %><% if (k !== 'ultra_rare') { %> · <% } %><% } %>, relative weights).
Sounds: built-in library, or upload more on the Media page.
<% if (!twitchOk) { %> Could not load your rewards from Twitch right now, so only rewards that already have variations are listed.<% } %>
<% for (const g of groups) { %>
<%= g.name %>
<% for (const t of g.items) {
const on = t.variations.filter(v => v.enabled);
const total = on.reduce((s, v) => s + (rarity[v.rarity]?.weight || 1), 0);
const anchor = `t-${t.kind}-${t.key}`; %>
<% if (t.image) { %><% } %>
<%= t.title %>
<% if (t.cost != null) { %><%= t.cost %> pts<% } %>
<% if (t.missing) { %>not on Twitch anymore<% } %>
<% if (t.live === false) { %>paused on Twitch<% } %>
<% if (t.variations.some(v => v.tts_voice_id)) { %>TTS<% } %>
<%= t.variations.length ? `${on.length}/${t.variations.length} variation${t.variations.length === 1 ? '' : 's'} on` : 'no alert' %>
<% if (on.length) { %>
<% } %>
<% for (const v of t.variations) { %>
<% } %>
<% } %>
<% } %>