diff --git a/tgbot.js b/tgbot.js index 6607a60..79fedd6 100644 --- a/tgbot.js +++ b/tgbot.js @@ -119,7 +119,28 @@ async function notifyEvent(evt) { } else if (evt.type === 'registered' && evt.referrerId) { const chat = memberChat(evt.referrerId); if (!chat) return; - await dm(chat, `šŸŽ‰ #${evt.id} just joined on your link!\nThe first 48 hours decide everything — run the play: https://rmcircle.team/training#lesson-6\nSay hello now: reply here with:\nmsg ${evt.id} Welcome to the team!`); + let msg = `šŸŽ‰ #${evt.id} just joined on your link!\nThe first 48 hours decide everything — run the play: https://rmcircle.team/training#lesson-6\nSay hello now: reply here with:\nmsg ${evt.id} Welcome to the team!`; + // If THIS registration is the one that took them to two directs, they have + // just crossed the eligibility gate and nothing else in the system tells + // them. Qualification is where members stall — 53 of them sat at Ascensus + // because getting two felt like the finish line. Say what it actually + // opened, at the only moment they are guaranteed to be paying attention. + try { + const me = await fetchMember(evt.referrerId); + if (me && Number(me.directCount) === 2) { + const ns = me.nextStep || {}, op = ns.opens || {}; + msg += `\n\n━━━━━━━━━━━━━━\nāœ… That was your SECOND direct — you are now QUALIFIED.\n\n` + + `From here you catch your two's first upgrades in full, without owning the level yourself.`; + if (op.perCatch > 0 && ns.cost > 0) { + msg += `\n\nYour next rung costs ${ns.cost.toFixed(2)} POL and extends your reach to generation ${op.gen}` + + (op.genSize > 0 ? `, where you already have ${op.genSize} ${op.genSize === 1 ? 'person' : 'people'}` : '') + + `. Each one pays you ${op.perCatch.toFixed(2)} POL — double what the rung costs, because every level is twice the last.` + + `\n\nThe trap is spending your catches instead of climbing with them: https://rmcircle.team/training#lesson-8` + + `\n\nYour dashboard: https://rmcircle.team/my/${evt.referrerId}`; + } + } + } catch (e) { /* the join notice still goes out */ } + await dm(chat, msg); } } catch (e) { console.error('tgbot notifyEvent', e.message); } }