Telegram bot that posts a welcome message (docs link, hackathon link, a security warning about seed phrases/private keys/impersonation) whenever someone joins the Vellar community group.
cp .env.example .env # then set TELEGRAM_BOT_TOKEN
npm install
npm startRequires:
- Bot privacy mode OFF (BotFather → your bot → Bot Settings → Group Privacy → Turn off)
- The bot added to the group as an admin (needs at least "Send Messages")
Render's free tier has no Background Worker option, so this runs as a Web
Service. Since the bot has no inbound HTTP traffic of its own (Telegram
updates arrive via long polling), it binds a trivial health-check HTTP
server on PORT purely so Render sees it as alive.
- Push this folder to its own GitHub repo.
- Render dashboard → New → Web Service → connect the repo.
- Build command:
npm install. Start command:npm start. - Environment variables: set
TELEGRAM_BOT_TOKEN(Render's secret env var UI, never commit it). Do not setPORT— Render sets it automatically. - Deploy.
Free Web Services spin down after ~15 minutes of no inbound HTTP
requests, which would kill the long-polling connection along with it. To
keep it awake, set up an external uptime pinger (e.g.
UptimeRobot, free tier) to GET the service's
Render URL (shown on the service dashboard, e.g.
https://vellar-welcome-bot.onrender.com) every 5–10 minutes. This is a
workaround for the free tier's sleep behavior, not a real fix — an upgrade
to a paid instance (or a Background Worker, once budget allows) removes the
need for it entirely.