diff --git a/rustplus/__init__.py b/rustplus/__init__.py index 5db485f..ac8c836 100644 --- a/rustplus/__init__.py +++ b/rustplus/__init__.py @@ -22,5 +22,5 @@ __name__ = "rustplus" __author__ = "olijeffers0n" -__version__ = "5.6.3" +__version__ = "5.6.4" __support__ = "Discord: https://discord.gg/nQqJe8qvP8" diff --git a/rustplus/api/base_rust_api.py b/rustplus/api/base_rust_api.py index 76ba734..f2159af 100644 --- a/rustplus/api/base_rust_api.py +++ b/rustplus/api/base_rust_api.py @@ -273,6 +273,9 @@ def command( if isinstance(coro, RegisteredListener): coro = coro.get_coro() + if self.remote.command_handler is None: + raise CommandsNotEnabledError("Not enabled") + if asyncio.iscoroutinefunction(coro): cmd_data = CommandData( coro, diff --git a/rustplus/api/remote/rustws.py b/rustplus/api/remote/rustws.py index 7d81dd1..bd2a8a6 100644 --- a/rustplus/api/remote/rustws.py +++ b/rustplus/api/remote/rustws.py @@ -77,7 +77,7 @@ async def connect( ) ) address += f"?v={str(self.magic_value)}" - self.connection = await connect(address, close_timeout=0) + self.connection = await connect(address, close_timeout=0, ping_interval=None) self.connected_time = time.time() break except Exception as exception: @@ -155,9 +155,10 @@ async def run(self) -> None: base64.b64decode(data) if self.use_test_server else data ) - except Exception: + except Exception as e: if self.connection_status == CONNECTED: - self.logger.warning( + print(e) + self.logger.exception( f"{datetime.now().strftime('%d/%m/%Y %H:%M:%S')} [RustPlus.py] Connection interrupted, Retrying" ) await self.connect(ignore_open_value=True)