You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Improve setup guide based on user onboarding feedback
- Clarify BotFather is a real bot to message directly, not a settings page
- Add step-by-step for adding bot during group creation
- Document Telegram Web limitation: cannot enable Topics (use desktop/mobile)
- Add easiest method for getting chat ID via curl + getUpdates
- Add config file setup option (recommended) alongside env vars
- Add tips for empty getUpdates results and bot member search
Co-Authored-By: DreamLabAI <github@thedreamlab.uk>
> **Note:**@BotFather is a real Telegram bot you message directly — it is not a settings page or a chat with yourself.
69
73
70
74
## Step 3: Create a Supergroup with Topics
71
75
@@ -83,30 +87,75 @@ graph TB
83
87
```
84
88
85
89
1. Create a new group in Telegram
86
-
2. Add your bot to the group
87
-
3. Go to Group Settings -> Enable **Topics**
90
+
2.**Add your bot during group creation**: in the "Add Members" screen, search for your bot's username (e.g. `TheDreamLabBot`) and select it
91
+
3. Go to Group Settings -> Enable **Topics** to convert it to a forum supergroup
88
92
4. Make the bot an **Administrator** with these permissions:
89
93
- Manage Topics
90
94
- Post Messages
91
95
- Delete Messages (optional, for topic cleanup)
92
96
97
+
> **Telegram Web limitation:** Enabling Topics (converting a group to a forum) may not be available in Telegram Web. Use the **Telegram desktop app** or **mobile app** to enable Topics in group settings. Once enabled, the forum works fine in Telegram Web.
98
+
>
99
+
> **Adding the bot:** If the group already exists, open the group -> click the group name header -> **Add Members** -> search for your bot username.
100
+
93
101
## Step 4: Get Your Chat ID
94
102
95
103
The chat ID identifies your supergroup. Supergroup IDs start with `-100`.
96
104
105
+
### Easiest method
106
+
107
+
1. Send any message in the group where your bot is a member
108
+
2. Run this command (replace `YOUR_TOKEN` with your bot token):
3. Look for `"chat": {"id": -100XXXXXXXXXX}` in the response — that negative number is your chat ID
115
+
97
116
### Using the helper script
98
117
99
118
```bash
100
119
./scripts/get-chat-id.sh YOUR_BOT_TOKEN
101
120
```
102
121
103
-
### Manual method
122
+
> **Tip:** If `getUpdates` returns an empty result, make sure you've sent a message in the group **after** adding the bot. The bot only sees messages sent after it joined.
Or use the interactive wizard which validates your token and chat ID:
153
+
154
+
```bash
155
+
ctm setup
156
+
```
108
157
109
-
##Step 5: Configure Environment
158
+
### Option B: Environment variables
110
159
111
160
Create `~/.telegram-env`:
112
161
@@ -122,6 +171,8 @@ Source it in your shell profile (`~/.bashrc` or `~/.zshrc`):
122
171
[[ -f~/.telegram-env ]] &&source~/.telegram-env
123
172
```
124
173
174
+
> **Note:** Environment variables take precedence over the config file. You can mix both — use the config file for stable settings and env vars for overrides.
0 commit comments