This commit is contained in:
juewuy
2026-01-17 20:09:21 +08:00

View File

@@ -192,7 +192,9 @@ set_bot_tg_service(){
fi
setconfig bot_tg_service "$bot_tg_service"
}
set_bot_tg() {
while true; do
[ -n "$ts_auth_key" ] && ts_auth_key_info='已设置'
[ -n "$TG_CHATID" ] && TG_CHATID_info='已绑定'
echo "-----------------------------------------------"
@@ -202,9 +204,11 @@ set_bot_tg(){
echo -e " 2 TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m"
echo -e " 0 返回上级菜单 \033[0m"
echo "-----------------------------------------------"
read -p "请输入对应数字 > " num
read -pr "请输入对应数字 > " num
case "$num" in
0) ;;
"" | 0)
break
;;
1)
. "$GT_CFG_PATH"
if [ -n "$TG_CHATID" ]; then
@@ -213,25 +217,24 @@ set_bot_tg(){
echo -e "\033[31m请先绑定TG-BOT\033[0m"
fi
sleep 1
set_bot_tg
;;
2)
if [ -n "$chat_ID" ] && [ -n "$push_TG" ] && [ "$push_TG" != 'publictoken' ]; then
read -p "检测到已经绑定了TG推送BOT是否直接使用(1/0) > " res
read -pr "检测到已经绑定了TG推送BOT是否直接使用(1/0) > " res
if [ "$res" = 1 ]; then
TOKEN="$push_TG"
set_bot_tg_config
set_bot_tg
return
continue
fi
fi
set_bot_tg_init
set_bot_tg
;;
*)
errornum
sleep 1
;;
esac
done
}
# 自定义入站