diff --git a/pyproject.toml b/pyproject.toml index 0536f4b..4122122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "streamlabsio" -version = "1.0.1" +version = "1.0.2" description = "Get real time Twitch/Youtube events through Streamlabs SocketIO API" authors = ["onyx-and-iris "] license = "MIT" diff --git a/streamlabsio/client.py b/streamlabsio/client.py index 0e9f9a0..5f6f564 100644 --- a/streamlabsio/client.py +++ b/streamlabsio/client.py @@ -71,12 +71,13 @@ class Client: if "for" in data and data["type"] in set( self.streamlabs + self.twitch + self.youtube ): + message = data["message"][0] if isinstance(data["message"][0], dict) else {} self.obs.trigger( data["for"], data["type"], - *data["message"] + message if self._raw - else as_dataclass(data["type"], *data["message"]), + else as_dataclass(data["type"], message), ) self.logger.debug(data)