mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-09-21 13:22:35 +00:00
🐛 remove args in creating bot
This commit is contained in:
parent
30132e21e8
commit
109125b583
@ -165,7 +165,7 @@ class Driver(BaseDriver):
|
|||||||
logger.warning("There's already a reverse websocket connection,"
|
logger.warning("There's already a reverse websocket connection,"
|
||||||
"so the event may be handled twice.")
|
"so the event may be handled twice.")
|
||||||
|
|
||||||
bot = BotClass(self, "http", self.config, x_self_id)
|
bot = BotClass("http", x_self_id)
|
||||||
|
|
||||||
asyncio.create_task(bot.handle_message(data))
|
asyncio.create_task(bot.handle_message(data))
|
||||||
return Response("", 204)
|
return Response("", 204)
|
||||||
@ -198,7 +198,7 @@ class Driver(BaseDriver):
|
|||||||
await ws.close(code=status.WS_1008_POLICY_VIOLATION)
|
await ws.close(code=status.WS_1008_POLICY_VIOLATION)
|
||||||
return
|
return
|
||||||
|
|
||||||
bot = BotClass(self, "websocket", self.config, x_self_id, websocket=ws)
|
bot = BotClass("websocket", x_self_id, websocket=ws)
|
||||||
|
|
||||||
await ws.accept()
|
await ws.accept()
|
||||||
logger.opt(colors=True).info(
|
logger.opt(colors=True).info(
|
||||||
|
Loading…
Reference in New Issue
Block a user