diff --git a/scripts/menus/7_gateway.sh b/scripts/menus/7_gateway.sh index ec10a710..9aba7b65 100644 --- a/scripts/menus/7_gateway.sh +++ b/scripts/menus/7_gateway.sh @@ -195,6 +195,7 @@ set_bot_tg(){ echo "-----------------------------------------------" 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 " 3 启动时推送菜单 \033[32m$TG_menupush\033[0m" echo -e " 0 返回上级菜单 \033[0m" echo "-----------------------------------------------" read -p "请输入对应数字 > " num @@ -223,6 +224,15 @@ set_bot_tg(){ set_bot_tg_init 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 ;; diff --git a/scripts/menus/bot_tg.sh b/scripts/menus/bot_tg.sh index 9f3c554e..15a53181 100644 --- a/scripts/menus/bot_tg.sh +++ b/scripts/menus/bot_tg.sh @@ -320,7 +320,7 @@ polling(){ done } -#send_menu +[ "$TG_menupush" = ON ] && send_menu polling