diff --git a/plugins/tgbot/index.py b/plugins/tgbot/index.py index cd040d32f..0074bb0a0 100755 --- a/plugins/tgbot/index.py +++ b/plugins/tgbot/index.py @@ -211,6 +211,17 @@ def setBotConf(): return mw.returnJson(True, '保存成功!', []) +def installPreInspection(): + i = sys.version_info + if i[0] < 3 or i[1] < 7: + return "telebot在python小于3.7无法正常使用" + return 'ok' + + +def uninstallPreInspection(): + return "请手动删除
rm -rf {}".format(getServerDir()) + + def runLog(): p = getServerDir() + '/task.log' return p @@ -234,6 +245,10 @@ if __name__ == "__main__": print(initdInstall()) elif func == 'initd_uninstall': print(initdUinstall()) + elif func == 'install_pre_inspection': + print(installPreInspection()) + elif func == 'uninstall_pre_inspection': + print(uninstallPreInspection(version)) elif func == 'get_bot_conf': print(getBotConf()) elif func == 'set_bot_conf': diff --git a/plugins/tgbot/info.json b/plugins/tgbot/info.json index 9fa669cf3..9119e3cc7 100755 --- a/plugins/tgbot/info.json +++ b/plugins/tgbot/info.json @@ -8,6 +8,7 @@ "tip": "soft", "checks": "server/tgbot", "path": "server/tgbot", + "install_pre_inspection":true, "display": 1, "author": "midokos", "date": "2023-03-06",