mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 07:51:45 +00:00
~增加每次启动tg_bot服务时自动推送菜单的开关
This commit is contained in:
@@ -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
|
||||
;;
|
||||
|
||||
@@ -320,7 +320,7 @@ polling(){
|
||||
done
|
||||
}
|
||||
|
||||
#send_menu
|
||||
[ "$TG_menupush" = ON ] && send_menu
|
||||
|
||||
polling
|
||||
|
||||
|
||||
Reference in New Issue
Block a user