mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 07:51:45 +00:00
~优化tg-bot启动流程,兼容更多设备
~优化nftables启动流程,优化启用cn绕过时的运行效率和数据显示 ~修复tg机器人守护进程没有生效的bug ~修复tg机器人总是绑定失败的bug ~修复9-8功能找不到文件的bug ~修复停止服务时的报错 ~修复启动时自动下载缺失数据库时的意外报错 ~修复nftables启用了本机代理后局域网代理出错的bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. "$CRASHDIR"/libs/web_json.sh
|
||||
. "$CRASHDIR"/libs/web_get_lite.sh
|
||||
|
||||
private_bot() {
|
||||
echo "-----------------------------------------------"
|
||||
@@ -28,7 +28,7 @@ set_bot() {
|
||||
echo "-----------------------------------------------"
|
||||
read -p "我已经发送完成(1/0) > " res
|
||||
if [ "$res" = 1 ]; then
|
||||
chat=$(web_json_get $url_tg 2>/dev/null)
|
||||
chat=$(web_get_lite $url_tg 2>/dev/null)
|
||||
[ -n "$chat" ] && chat_ID=$(echo $chat | sed 's/"update_id":/{\n"update_id":/g' | grep "$public_key" | head -n1 | grep -oE '"id":.*,"is_bot' | sed s'/"id"://' | sed s'/,"is_bot//')
|
||||
[ -z "$chat_ID" ] && [ "$TOKEN" != 'publictoken' ] && {
|
||||
echo -e "\033[31m无法获取对话ID,请返回重新设置或手动输入ChatID!\033[0m"
|
||||
|
||||
Reference in New Issue
Block a user