pull/393/head
midoks 2 years ago
parent 7bc7fdecae
commit a7cac3d671
  1. 15
      plugins/tgbot/index.py
  2. 1
      plugins/tgbot/info.json

@ -211,6 +211,17 @@ def setBotConf():
return mw.returnJson(True, '保存成功!', []) 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 "请手动删除<br/> rm -rf {}".format(getServerDir())
def runLog(): def runLog():
p = getServerDir() + '/task.log' p = getServerDir() + '/task.log'
return p return p
@ -234,6 +245,10 @@ if __name__ == "__main__":
print(initdInstall()) print(initdInstall())
elif func == 'initd_uninstall': elif func == 'initd_uninstall':
print(initdUinstall()) print(initdUinstall())
elif func == 'install_pre_inspection':
print(installPreInspection())
elif func == 'uninstall_pre_inspection':
print(uninstallPreInspection(version))
elif func == 'get_bot_conf': elif func == 'get_bot_conf':
print(getBotConf()) print(getBotConf())
elif func == 'set_bot_conf': elif func == 'set_bot_conf':

@ -8,6 +8,7 @@
"tip": "soft", "tip": "soft",
"checks": "server/tgbot", "checks": "server/tgbot",
"path": "server/tgbot", "path": "server/tgbot",
"install_pre_inspection":true,
"display": 1, "display": 1,
"author": "midokos", "author": "midokos",
"date": "2023-03-06", "date": "2023-03-06",

Loading…
Cancel
Save