mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix console
This commit is contained in:
parent
502ba378a9
commit
86aad4a80e
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ from rich.console import Console
|
||||||
|
|
||||||
_col, _ = shutil.get_terminal_size((80, 20))
|
_col, _ = shutil.get_terminal_size((80, 20))
|
||||||
if _col == 80:
|
if _col == 80:
|
||||||
_col = 160
|
_col = 200
|
||||||
|
|
||||||
__all__ = ("console",)
|
__all__ = ("console",)
|
||||||
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ async def bridge(req: Request):
|
||||||
@app.websocket("/bridge/recv")
|
@app.websocket("/bridge/recv")
|
||||||
async def bridge_recv(ws: WebSocket, secret: str = Header(None)):
|
async def bridge_recv(ws: WebSocket, secret: str = Header(None)):
|
||||||
await ws.accept()
|
await ws.accept()
|
||||||
print("Websocket %r accepted.", ws)
|
print("Websocket %r accepted." % ws)
|
||||||
if secret != app.state.bot.http.token:
|
if secret != app.state.bot.http.token:
|
||||||
print("Closing websocket %r, invalid secret." % ws)
|
print("Closing websocket %r, invalid secret." % ws)
|
||||||
raise _WSException(code=1008, reason="Invalid Secret")
|
raise _WSException(code=1008, reason="Invalid Secret")
|
||||||
|
|
Loading…
Reference in a new issue