mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-25 13:56:08 +00:00
feat: 输出版本时检查是否有新版
This commit is contained in:
@@ -243,7 +243,14 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
|
|||||||
and not config.include_image_description):
|
and not config.include_image_description):
|
||||||
reply.append(" ".join(params))
|
reply.append(" ".join(params))
|
||||||
elif cmd == 'version':
|
elif cmd == 'version':
|
||||||
reply = ["[bot]当前版本:\n{}".format(pkg.utils.updater.get_current_version_info())]
|
reply_str = "[bot]当前版本:{}\n".format(pkg.utils.updater.get_current_version_info())
|
||||||
|
try:
|
||||||
|
if pkg.utils.updater.is_new_version_available():
|
||||||
|
reply_str += "\n有新版本可用,请使用命令 !update 进行更新"
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
reply = [reply_str]
|
||||||
elif cmd == 'reload' and launcher_type == 'person' and launcher_id == config.admin_qq:
|
elif cmd == 'reload' and launcher_type == 'person' and launcher_id == config.admin_qq:
|
||||||
def reload_task():
|
def reload_task():
|
||||||
pkg.utils.reloader.reload_all()
|
pkg.utils.reloader.reload_all()
|
||||||
|
|||||||
Reference in New Issue
Block a user