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:
martbost
2026-08-28 07:59:40 -05:00
parent f7d5c3f358
commit 3c21f9f615
5 changed files with 128 additions and 3 deletions
+16
View File
@@ -9,6 +9,7 @@
// - Never logs the API key.
const fs = require('fs');
const path = require('path');
const suiteTools = require('./suite-tools');
const BLOTATO_URL = 'https://backend.blotato.com/v2/posts';
const MIN_GAP_MS = 2600; // ~23/min ceiling, under Blotato's 30/min
@@ -55,6 +56,21 @@ function render(evt, cfg) {
const u = evt.upgrade;
const lvl = (u && (u.levelName)) || evt.levelName;
const up = (u && u.id && lvl) ? `Member #${u.id} upgraded to ${lvl} and ` : '';
// What that upgrade unlocked in the Circle Suite — only when the tools are
// live AND config.suiteToolsInAlerts is on (see suite-tools.js).
const tool = suiteTools.unlockTerse((u && u.level), lvl, cfg);
if (tool) {
body = pick([
`🚀 Level up! ${up}${pol} POL landed on Member #${evt.toId}'s position — and that upgrade unlocked ${tool}. 💎`,
`⚡ ${up}Member #${evt.toId} received ${pol} POL straight from the contract — the upgrade also opened up ${tool}. 🔗`,
`🔥 ${up}${pol} POL paid up to Member #${evt.toId} on Polygon — plus ${tool} unlocked with the level. 🚀`,
]);
const headT = `${body}\n\nSee how it works 👉 ${cta}`;
let outT = `${headT}\n\n${tags}`;
if (outT.length > 280) outT = headT;
if (outT.length > 280) outT = headT.slice(0, 279) + '…';
return outT;
}
body = pick([
`🚀 Level up! ${up}${pol} POL just landed on Member #${evt.toId}'s position — instant, on-chain, unstoppable. 💎`,
`⚡ Another upgrade paid! ${up}Member #${evt.toId} received ${pol} POL straight from the smart contract — no middleman. 🔗`,