mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 19:11:00 +00:00
⬆️ upgrade uvicorn
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
ENVIRONMENT=dev
|
||||
LOG_LEVEL=25
|
||||
CUSTOM_CONFIG=common
|
||||
FASTAPI_RELOAD_DIRS=["test_plugins"]
|
||||
# FASTAPI_RELOAD_DIRS=["test_plugins"]
|
||||
|
@ -5,10 +5,10 @@ sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
import nonebot
|
||||
from nonebot.adapters.cqhttp import Bot
|
||||
from nonebot.log import logger, default_format
|
||||
from nonebot.adapters.ding import Bot as DingBot
|
||||
from nonebot.adapters.mirai import Bot as MiraiBot
|
||||
from nonebot.adapters.feishu import Bot as FeishuBot
|
||||
from nonebot.log import logger, default_format
|
||||
|
||||
# test custom log
|
||||
logger.add("error.log",
|
||||
@ -18,7 +18,7 @@ logger.add("error.log",
|
||||
format=default_format)
|
||||
|
||||
nonebot.init(custom_config2="config on init")
|
||||
# app = nonebot.get_asgi()
|
||||
app = nonebot.get_asgi()
|
||||
driver = nonebot.get_driver()
|
||||
driver.register_adapter("cqhttp", Bot)
|
||||
driver.register_adapter("ding", DingBot)
|
||||
@ -37,5 +37,5 @@ config.custom_config3 = config.custom_config1
|
||||
config.custom_config4 = "New custom config"
|
||||
|
||||
if __name__ == "__main__":
|
||||
# nonebot.run(app="__mp_main__:app")
|
||||
nonebot.run()
|
||||
nonebot.run(app="__mp_main__:app")
|
||||
# nonebot.run()
|
||||
|
Reference in New Issue
Block a user