8080# ── Gather config ──────────────────────────────────────
8181
8282header " Configuration"
83- echo " You'll need: a Telegram bot token and your chat ID."
84- echo " Get a bot token from @BotFather on Telegram."
85- echo " Get your chat ID by messaging @userinfobot on Telegram."
86- echo " "
8783
8884# Detect public IP
8985DETECTED_IP=$( curl -s --max-time 5 ifconfig.me 2> /dev/null || curl -s --max-time 5 icanhazip.com 2> /dev/null || echo " " )
@@ -97,11 +93,37 @@ if [ -f .env ] && [ -s .env ]; then
9793fi
9894
9995if [ " ${SKIP_ENV:- } " != " true" ]; then
100- ask " Telegram bot token:" TELEGRAM_BOT_TOKEN
96+
97+ # ── Step 1: Telegram bot token ─────────────────────
98+ header " Step 1 — Telegram Bot"
99+ echo " You need a Telegram bot. It takes 30 seconds:"
100+ echo " "
101+ echo " 1. Open Telegram and search for @BotFather"
102+ echo " 2. Send: /newbot"
103+ echo " 3. Choose a name (e.g. \" My Pleng\" )"
104+ echo " 4. Choose a username (e.g. \" my_pleng_bot\" )"
105+ echo " 5. BotFather gives you a token like: 123456:ABC-DEF..."
106+ echo " "
107+ ask " Paste your bot token here:" TELEGRAM_BOT_TOKEN
101108 [ -z " $TELEGRAM_BOT_TOKEN " ] && error " Bot token is required"
109+ ok " Bot token saved"
102110
103- ask " Telegram chat ID:" TELEGRAM_CHAT_ID
111+ # ── Step 2: Chat ID ────────────────────────────────
112+ echo " "
113+ header " Step 2 — Your Chat ID"
114+ echo " The bot will only respond to YOU. We need your chat ID:"
115+ echo " "
116+ echo " 1. Open Telegram and search for @userinfobot"
117+ echo " 2. Send: /start"
118+ echo " 3. It replies with your ID (a number like 123456789)"
119+ echo " "
120+ ask " Paste your chat ID here:" TELEGRAM_CHAT_ID
104121 [ -z " $TELEGRAM_CHAT_ID " ] && error " Chat ID is required"
122+ ok " Chat ID saved"
123+
124+ # ── Step 3: Server config ──────────────────────────
125+ echo " "
126+ header " Step 3 — Server"
105127
106128 ask " VPS public IP [$DETECTED_IP ]:" PUBLIC_IP
107129 PUBLIC_IP=${PUBLIC_IP:- $DETECTED_IP }
0 commit comments