~增加每次启动tg_bot服务时自动推送菜单的开关

This commit is contained in:
juewuy
2026-02-10 19:31:15 +08:00
parent f2ce2fb9b4
commit 37269ef851
2 changed files with 11 additions and 1 deletions

View File

@@ -195,6 +195,7 @@ set_bot_tg(){
echo "-----------------------------------------------" echo "-----------------------------------------------"
echo -e " 1 启用/关闭TG-BOT服务 \033[32m$bot_tg_service\033[0m" echo -e " 1 启用/关闭TG-BOT服务 \033[32m$bot_tg_service\033[0m"
echo -e " 2 TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m" echo -e " 2 TG-BOT绑定设置 \033[32m$TG_CHATID_info\033[0m"
echo -e " 3 启动时推送菜单 \033[32m$TG_menupush\033[0m"
echo -e " 0 返回上级菜单 \033[0m" echo -e " 0 返回上级菜单 \033[0m"
echo "-----------------------------------------------" echo "-----------------------------------------------"
read -p "请输入对应数字 > " num read -p "请输入对应数字 > " num
@@ -223,6 +224,15 @@ set_bot_tg(){
set_bot_tg_init set_bot_tg_init
set_bot_tg set_bot_tg
;; ;;
3)
if [ "$TG_menupush" = ON ];then
TG_menupush=OFF
else
TG_menupush=ON
fi
setconfig TG_menupush "$TG_menupush"
set_bot_tg
;;
*) *)
errornum errornum
;; ;;

View File

@@ -320,7 +320,7 @@ polling(){
done done
} }
#send_menu [ "$TG_menupush" = ON ] && send_menu
polling polling