Network Weekend: Builder Bundle cap 24 (DH keeperGrantsLeft 49, 5 PRO_PENDING, 20 reserve); tier Game Pass bonus days only said while sovTiers is on (it is 0 live) (Marty 2026-11-17)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 08:27:05 -06:00
parent d471a5664d
commit c65e57dadc
3 changed files with 15 additions and 12 deletions
+8 -7
View File
@@ -15,7 +15,7 @@
// - the chatbot fact and answer, the /api/promodays view for the strip, Overview card and /weekend page
//
// Settings (siteConfig): promoDaysOn '1'|'0' (kill switch), promoDays (JSON {"YYYY-MM-DD": {pct, minCents, name}}), weekendStart /
// weekendEnd / weekendPassEnd (ISO), weekendLinkspinCode, weekendBuilderCap (25), promoMailBase (link base for emails, default the share domain instantadpay.link).
// weekendEnd / weekendPassEnd (ISO), weekendLinkspinCode, weekendBuilderCap (24: DH keeperGrantsLeft 49 on 11-17, minus 5 PRO_PENDING, keeps a 20-grant reserve), promoMailBase (link base for emails, default the share domain instantadpay.link).
// Test clock: env IAP_TEST_NOW (ISO), ignored when NODE_ENV=production. Copy rules: no em dashes, Central times, no income promises.
'use strict';
const fs = require('fs');
@@ -35,7 +35,7 @@ const DEFAULT_DAYS = {
};
const DEFAULTS = {
weekendStart: '2026-11-27T00:00:00-06:00', weekendEnd: '2026-12-01T00:00:00-06:00', weekendPassEnd: '2026-12-04T00:00:00-06:00',
weekendLinkspinCode: 'WEEKEND500', weekendStarterMinCents: 2000, weekendBuilderMinCents: 10000, weekendBuilderCap: 25,
weekendLinkspinCode: 'WEEKEND500', weekendStarterMinCents: 2000, weekendBuilderMinCents: 10000, weekendBuilderCap: 24,
passBonus: { explorer: 15, champion: 15, legend: 60 } // days on top of the tier's own (30, 30, 365)
};
@@ -61,7 +61,8 @@ function cfg() {
builderMin: Number(c.weekendBuilderMinCents) || DEFAULTS.weekendBuilderMinCents,
builderCap: Math.max(0, Number(c.weekendBuilderCap == null ? DEFAULTS.weekendBuilderCap : c.weekendBuilderCap) || 0),
mailBase: String(c.promoMailBase || 'https://instantadpay.link').replace(/\/+$/, ''), // instantadpay.com is on the Spamhaus DBL (still listed 2026-11-17): email links use the share domain
passBonus: DEFAULTS.passBonus
passBonus: DEFAULTS.passBonus,
tiersOn: String(c.sovTiers) === '1' // the tier passes are only on sale with sovTiers; the pass bonus days are only said while they are
};
}
// the mapped day at ts, or null: { day, pct, minCents, name }
@@ -143,7 +144,7 @@ function view(t) {
st = { packs, usd, bonusCredits: Object.values(S.granted).filter(g => g.day === d.day).reduce((s, g) => s + g.bonus, 0) }; }
return { on: c.on, live, today: d ? { day: d.day, name: d.name, pct: d.pct, minUsd: d.minCents / 100, stats: st } : null, days: list,
startsAt: new Date(c.start).toISOString(), endsAt: new Date(c.end).toISOString(), passEndsAt: new Date(c.passEnd).toISOString(),
published: true, passBonusLive: c.on && t >= c.start && t < c.passEnd, passBonus: c.passBonus, lsCode: live ? c.lsCode : null, builderCap: c.builderCap, note: CREDITS_LINE };
published: true, passBonusLive: c.on && c.tiersOn && t >= c.start && t < c.passEnd, passBonus: c.passBonus, lsCode: live ? c.lsCode : null, builderCap: c.builderCap, note: CREDITS_LINE };
}
// Thanksgiving: friday.js sends this instead of the normal Thursday copy when tomorrow is a mapped Friday (one message)
@@ -165,10 +166,10 @@ function thursdayCopy(nextFridayKey) {
// the chatbot (chatbot.js): a fact for the system prompt and one answer, only while the weekend (or the Game Pass days) is on
function chatFact(t) {
const c = cfg(); t = t == null ? now() : t;
if (!c.on || t < c.start - 86400000 || t >= c.passEnd) return '';
if (!c.on || t < c.start - 86400000 || t >= (c.tiersOn ? c.passEnd : c.end)) return '';
if (t < c.start) return '- NETWORK WEEKEND (starts Fri 2026-11-27 00:00 Central, tomorrow): Black Friday to Cyber Monday, midnight to midnight Central. Not live yet: say it starts at midnight; deals at https://instantadpay.com/weekend.\n';
if (t >= c.end) return '- NETWORK WEEKEND is over (it ended Mon 11-30 at midnight Central). Still on until Thu 12-03 23:59 Central: tier Game Pass bonus days (Explorer and Champion 45 days, Legend 365 + 60). Five Dollar Friday is back to +20% on $5+ from Fri 12-04.\n';
return '- NETWORK WEEKEND (LIVE now, Fri 11-27 00:00 to Mon 11-30 23:59 Central, midnight to midnight): Black Friday +40% bonus ad credits on any $5+ pack (instead of the usual Five Dollar Friday +20%, never both) plus the free 7-day Game Pass; Saturday and Sunday +20% on $5+; Cyber Monday +30% on $20+. Weekend Starter Bundle: any $20+ pack gets the LinkSpin code ' + c.lsCode + ' (500 LinkSpin credits, shown on the purchase notice). Builder Bundle: any $100+ pack gets DownlineHydra Pro free for the paying wallet, first ' + c.builderCap + ' comps, nobody is paid on a comp. Code NETWORKWEEKEND: 300 bonus ad credits, paid in 5 daily installments as the member finishes the daily ad set, one per account, new and existing accounts, valid until Mon 11-30 23:59 Central. Tier Game Pass bonus days through Thu 12-03 23:59 Central (Explorer and Champion 45 days, Legend 365 + 60) when the tier passes are on sale. Every pack pays its sponsor line in full. No price is cut on InstantAdPay. All deals: https://instantadpay.com/weekend. Ad credits buy advertising, not income; never promise income.\n';
if (t >= c.end) return !c.tiersOn ? '' : '- NETWORK WEEKEND is over (it ended Mon 11-30 at midnight Central). Still on until Thu 12-03 23:59 Central: tier Game Pass bonus days (Explorer and Champion 45 days, Legend 365 + 60). Five Dollar Friday is back to +20% on $5+ from Fri 12-04.\n';
return '- NETWORK WEEKEND (LIVE now, Fri 11-27 00:00 to Mon 11-30 23:59 Central, midnight to midnight): Black Friday +40% bonus ad credits on any $5+ pack (instead of the usual Five Dollar Friday +20%, never both) plus the free 7-day Game Pass; Saturday and Sunday +20% on $5+; Cyber Monday +30% on $20+. Weekend Starter Bundle: any $20+ pack gets the LinkSpin code ' + c.lsCode + ' (500 LinkSpin credits, shown on the purchase notice). Builder Bundle: any $100+ pack gets DownlineHydra Pro free for the paying wallet, first ' + c.builderCap + ' comps, nobody is paid on a comp. Code NETWORKWEEKEND: 300 bonus ad credits, paid in 5 daily installments as the member finishes the daily ad set, one per account, new and existing accounts, valid until Mon 11-30 23:59 Central.' + (c.tiersOn ? ' Tier Game Pass bonus days through Thu 12-03 23:59 Central (Explorer and Champion 45 days, Legend 365 + 60).' : '') + ' Every pack pays its sponsor line in full. No price is cut on InstantAdPay. All deals: https://instantadpay.com/weekend. Ad credits buy advertising, not income; never promise income.\n';
}
const CHAT_RE = /(black friday|cyber monday|network weekend|weekend (deal|sale|bonus|promo|special)s?|thanksgiving|bundle|networkweekend|friday (bonus|promo|deal|special)|five dollar friday)/i;
function chatAnswer(msg, t) {