@@ -50,7 +50,6 @@ TELEGRAM_BOT_TOKEN=your_bot_token_here
5050TELEGRAM_BOT_USERNAME=your_bot_username
5151TELEGRAM_WEBHOOK_SECRET=your_webhook_secret
5252TELEGRAM_REQUIRED_MENTION=true
53- TELEGRAM_PREFIX=!eval
5453
5554# Zalo Configuration
5655ZALO_BOT_TOKEN=your_zalo_oa_token
@@ -105,9 +104,8 @@ curl -X POST "https://openapi.zalo.me/v3.0/oa/webhook" \
105104The bot responds to messages in several ways:
106105
1071061 . ** Direct Mention** : ` @your_bot_username Hello! `
108- 2 . ** Prefix Command** : ` !eval What is the weather like? `
109- 3 . ** Reply to Bot** : Reply to any bot message for continued conversation
110- 4 . ** Private Messages** : All messages in private chats
107+ 2 . ** Reply to Bot** : Reply to any bot message for continued conversation
108+ 3 . ** Private Messages** : All messages in private chats
111109
112110Zalo Official Account subscribers are supported through the configured webhook and receive the same evaluation experience.
113111
@@ -117,8 +115,6 @@ Zalo Official Account subscribers are supported through the configured webhook a
117115User: @valjean What is artificial intelligence?
118116Bot: Artificial intelligence (AI) refers to the simulation of human intelligence...
119117
120- User: !eval Explain quantum computing
121- Bot: Quantum computing is a revolutionary computing paradigm...
122118```
123119
124120## 🏗️ Project Structure
@@ -154,7 +150,6 @@ valjean/
154150| ` TELEGRAM_BOT_USERNAME ` | ` valjean ` | Bot username for mentions |
155151| ` TELEGRAM_WEBHOOK_SECRET ` | - | Secret for webhook security |
156152| ` TELEGRAM_REQUIRED_MENTION ` | ` true ` | Require @mention in groups |
157- | ` TELEGRAM_PREFIX ` | ` !eval ` | Command prefix trigger |
158153| ` OPENAI_KEY ` | - | OpenAI API key |
159154| ` ZALO_BOT_TOKEN ` | - | Zalo Official Account access token |
160155| ` ZALO_BOT_USERNAME ` | ` valjean ` | Display name used for Zalo responses |
@@ -183,25 +178,6 @@ curl -s "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getWebhookInfo" | jq
183178curl -s " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /deleteWebhook"
184179
185180
186- # global commands
187- curl -s -X POST " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /setMyCommands" \
188- -H " Content-Type: application/json" \
189- -d ' {
190- "commands": [
191- {"command":"eval","description":"Analyze a replied message or text"},
192- {"command":"help","description":"How to use this bot"}
193- ]
194- }'
195-
196- # restrict to all group chats
197- curl -s -X POST " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /setMyCommands" \
198- -H " Content-Type: application/json" \
199- -d ' {
200- "commands":[{"command":"eval","description":"Analyze a replied message or text"}],
201- "scope":{"type":"all_group_chats"}
202- }'
203-
204-
205181# name
206182curl -s -X POST " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /setMyName" \
207183 -d " name=Valjean"
@@ -215,15 +191,6 @@ curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/setMyDescriptio
215191 --data-urlencode " description=I analyze the message you replied to when you tag me in groups."
216192
217193
218- curl -s -X POST " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /setMyDefaultAdministratorRights" \
219- -H " Content-Type: application/json" \
220- -d ' {"rights":{"can_delete_messages":true,"can_manage_topics":true},"for_channels":false}'
221-
222-
223- curl -s -X POST " https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN /setChatMenuButton" \
224- -H " Content-Type: application/json" \
225- -d ' {"menu_button":{"type":"commands"}}'
226-
227194```
228195
229196Group Privacy Mode (ON/OFF) → must use @BotFather → Bot Settings → Group Privacy → Turn off
0 commit comments