mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-27 18:45:05 +08:00
fix ws reverse
This commit is contained in:
parent
c1d0eae34b
commit
b99c9688e2
@ -157,12 +157,13 @@ class Driver(BaseDriver):
|
||||
websocket = WebSocket(websocket)
|
||||
|
||||
# Create Bot Object
|
||||
if adapter == "coolq":
|
||||
bot = CQBot(self,
|
||||
"websocket",
|
||||
self.config,
|
||||
x_self_id,
|
||||
websocket=websocket)
|
||||
if adapter in self._adapters:
|
||||
BotClass = self._adapters[adapter]
|
||||
bot = BotClass(self,
|
||||
"websocket",
|
||||
self.config,
|
||||
x_self_id,
|
||||
websocket=websocket)
|
||||
else:
|
||||
await websocket.close(code=status.WS_1003_UNSUPPORTED_DATA)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user