add cqhttp forward support

This commit is contained in:
yanyongyu
2021-07-20 15:35:56 +08:00
parent 04b3fda40c
commit ecc613f6c5
10 changed files with 278 additions and 159 deletions

View File

@ -1,4 +1,4 @@
DRIVER=nonebot.drivers.fastapi
DRIVER=nonebot.drivers.aiohttp:Driver
HOST=0.0.0.0
PORT=2333
DEBUG=true
@ -13,6 +13,8 @@ COMMAND_SEP=["/", "."]
CUSTOM_CONFIG1=config in env
CUSTOM_CONFIG3=
CQHTTP_WS_URLS={"123123123": "ws://127.0.0.1:6700/"}
MIRAI_AUTH_KEY=12345678
MIRAI_HOST=127.0.0.1
MIRAI_PORT=8080

View File

@ -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,4 +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(app="__mp_main__:app")
nonebot.run()