mirror of
https://github.com/tiennm99/store-scraper-bot.git
synced 2026-05-14 06:59:15 +00:00
14b6cc7965
setMyCommands now runs at default scope (user commands only) plus once
per ADMIN_ID with scope:{type:'chat'} carrying the full set, so admin
commands (/addgroup, /delgroup, /listgroup) are hidden from non-admins'
menu. requireAdminUser remains the actual auth gate; this is UI cleanup.
parseAdminIds extracted to src/util/parse-admin-ids.js — shared between
config loading and the register script. ADMIN_IDS now required by
register-webhook.js (.env.deploy.example updated). Per-admin call uses
allowFail to gracefully skip admins who haven't DMed the bot yet.
16 lines
612 B
Bash
16 lines
612 B
Bash
# Operator-only file: holds the credentials the deploy scripts need.
|
|
# Copy to .env.deploy and fill in. NEVER commit .env.deploy.
|
|
|
|
# Telegram (must match values set as Vercel env vars).
|
|
# Used by: scripts/register-webhook.js, scripts/set-bot-description.js
|
|
TELEGRAM_BOT_TOKEN=
|
|
TELEGRAM_WEBHOOK_SECRET=
|
|
|
|
# Comma-separated Telegram user IDs (must match Vercel ADMIN_IDS).
|
|
# register-webhook.js sets a chat-scoped menu (with admin commands) per ID.
|
|
ADMIN_IDS=
|
|
|
|
# Where Telegram should send webhook updates.
|
|
# Format: https://<your-vercel-url>/api/webhook
|
|
WORKER_URL=https://store-scraper-bot.vercel.app/api/webhook
|