mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
fix: main.py中错误的预引用顺序
This commit is contained in:
12
main.py
12
main.py
@@ -6,12 +6,6 @@ import time
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import mirai.exceptions
|
||||
import requests
|
||||
import websockets.exceptions
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
|
||||
try:
|
||||
import colorlog
|
||||
except ImportError:
|
||||
@@ -19,6 +13,11 @@ except ImportError:
|
||||
sys.exit(1)
|
||||
import colorlog
|
||||
|
||||
import requests
|
||||
import websockets.exceptions
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
|
||||
|
||||
sys.path.append(".")
|
||||
|
||||
log_colors_config = {
|
||||
@@ -120,6 +119,7 @@ def main(first_time_init=False):
|
||||
|
||||
if first_time_init: # 不是热重载之后的启动,则不启动新的bot线程
|
||||
|
||||
import mirai.exceptions
|
||||
def run_bot_wrapper():
|
||||
global known_exception_caught
|
||||
try:
|
||||
|
||||
@@ -243,7 +243,7 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
|
||||
and not config.include_image_description):
|
||||
reply.append(" ".join(params))
|
||||
elif cmd == 'version':
|
||||
reply_str = "[bot]当前版本:{}\n".format(pkg.utils.updater.get_current_version_info())
|
||||
reply_str = "[bot]当前版本:\n{}\n".format(pkg.utils.updater.get_current_version_info())
|
||||
try:
|
||||
if pkg.utils.updater.is_new_version_available():
|
||||
reply_str += "\n有新版本可用,请使用命令 !update 进行更新"
|
||||
|
||||
Reference in New Issue
Block a user