Mypy error

This commit is contained in:
DarkCat09 2022-10-05 17:08:24 +04:00
parent bb019d1416
commit 2a9f28793c

View file

@ -228,11 +228,13 @@ class AternosWss:
logging.warning('Did you forget to call socket.connect?') logging.warning('Did you forget to call socket.connect?')
await self.connect() await self.connect()
assert self.socket is not None
if isinstance(obj, dict): if isinstance(obj, dict):
obj = json.dumps(obj) obj = json.dumps(obj)
await self.socket.send(obj) await self.socket.send(obj)
async def command(self, cmd: str) -> None: async def command(self, cmd: str) -> None:
"""Sends a Minecraft command """Sends a Minecraft command