mirror of
https://github.com/onyx-and-iris/streamlabs-socketio-py
synced 2024-11-21 23:10:48 +00:00
fixes TypeError bug
This commit is contained in:
parent
99ab0f00f8
commit
e92c3b2e6f
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "streamlabsio"
|
name = "streamlabsio"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
description = "Get real time Twitch/Youtube events through Streamlabs SocketIO API"
|
description = "Get real time Twitch/Youtube events through Streamlabs SocketIO API"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -71,12 +71,13 @@ class Client:
|
|||||||
if "for" in data and data["type"] in set(
|
if "for" in data and data["type"] in set(
|
||||||
self.streamlabs + self.twitch + self.youtube
|
self.streamlabs + self.twitch + self.youtube
|
||||||
):
|
):
|
||||||
|
message = data["message"][0] if isinstance(data["message"][0], dict) else {}
|
||||||
self.obs.trigger(
|
self.obs.trigger(
|
||||||
data["for"],
|
data["for"],
|
||||||
data["type"],
|
data["type"],
|
||||||
*data["message"]
|
message
|
||||||
if self._raw
|
if self._raw
|
||||||
else as_dataclass(data["type"], *data["message"]),
|
else as_dataclass(data["type"], message),
|
||||||
)
|
)
|
||||||
self.logger.debug(data)
|
self.logger.debug(data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user