Fixed IPC client creation issue

This commit is contained in:
Choco
2024-06-30 18:09:53 +08:00
parent 75b7e5e827
commit ae1ff38761

View File

@@ -74,9 +74,9 @@ class Vocard(commands.Bot):
except Exception as e:
func.logger.error(f"Something went wrong while loading {module[:-3]} cog.", exc_info=e)
self.ipc = IPCClient(self, **func.settings.ipc_client)
if func.settings.ipc_client.get("enable", False):
try:
self.ipc = IPCClient(self, **func.settings.ipc_client)
await self.ipc.connect()
except Exception as e:
func.logger.error(f"Cannot connected to dashboard! - Reason: {e}")