Rename to hkt.sh
This commit is contained in:
15
scripts/fix-telegram-menu.sh
Executable file
15
scripts/fix-telegram-menu.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
TOKEN=$(python3 -c "import json; c=json.load(open('$HOME/.openclaw/openclaw.json')); tg=c.get('telegram',c.get('channels',{}).get('telegram',{})); print(tg.get('botToken',''))")
|
||||
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/setMyCommands" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"commands": [
|
||||
{"command": "new", "description": "新对话"},
|
||||
{"command": "stop", "description": "停止生成"},
|
||||
{"command": "status", "description": "查看状态"},
|
||||
{"command": "models", "description": "查看可用模型"},
|
||||
{"command": "reasoning", "description": "切换推理模式"},
|
||||
{"command": "restart", "description": "重启 Gateway"},
|
||||
{"command": "help", "description": "帮助"}
|
||||
]
|
||||
}'
|
||||
Reference in New Issue
Block a user