mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 19:11:00 +00:00
✨ add cqhttp forward support
This commit is contained in:
@ -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
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user