Payout alerts highlight unlocked tools: shared suite-tools level map drives the Telegram team feed, recruiting feed, member DM on upgrade, and X posts; only announces LIVE tiers and gated behind config.suiteToolsInAlerts (off until Suite launch)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const suiteTools = require('./suite-tools');
|
||||
let DATA_DIR = '', chain = null, getConfig = null, messages = null;
|
||||
const FILE = () => path.join(DATA_DIR, 'tg-links.json');
|
||||
|
||||
@@ -101,6 +102,14 @@ async function notifyEvent(evt) {
|
||||
if (!chat) return;
|
||||
const kind = evt.kind === 'upline' ? `${evt.gen ? `Gen ${evt.gen} ` : ''}upgrade pass-up from #${evt.fromId}` : `referral reward from #${evt.fromId}'s entry`;
|
||||
await dm(chat, `💰 You just caught ${evt.pol.toFixed(2)} POL — ${kind}.\nVerify: https://polygonscan.com/tx/${evt.tx}\n\nYour pipeline: https://rmcircle.team/my/${evt.toId}`);
|
||||
} else if (evt.type === 'upgraded') {
|
||||
// Congratulate the member who upgraded, and tell them what it opened up.
|
||||
const chat = memberChat(evt.id);
|
||||
if (!chat) return;
|
||||
const tools = suiteTools.unlockText(evt.level, evt.levelName, getConfig());
|
||||
await dm(chat, `⚡ You're now ${evt.levelName}!\n\nYour reach just extended one generation deeper — payments from that layer can now land on you.` +
|
||||
(tools ? `\n\n🧰 This level also unlocked ${tools}.\nOpen it: https://rmcircle.team/suite` : '') +
|
||||
`\n\nNow teach your two to climb: https://rmcircle.team/training#lesson-8`);
|
||||
} else if (evt.type === 'registered' && evt.referrerId) {
|
||||
const chat = memberChat(evt.referrerId);
|
||||
if (!chat) return;
|
||||
|
||||
Reference in New Issue
Block a user