Skip to content

Commit 6903c49

Browse files
committed
Fix subroom dataclass I hate this :)
1 parent 1ba0c87 commit 6903c49

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "recnetpy"
7-
version = "0.2.69"
7+
version = "0.2.70"
88
authors = [
99
{ name="RecNetBot Development"}
1010
]

src/recnetpy/dataclasses/subroom.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,19 @@ class SubRoom(VariableClass['SubRoomResponse']):
4040
description: Optional[str]
4141

4242
def __init__(self, data: 'SubRoomResponse'):
43-
if data.get("CurrentSave"):
44-
description = data["CurrentSave"].get("Description")
45-
saved_at = date_to_unix(data["CurrentSave"]["CreatedAt"])
46-
saved_by = data["CurrentSave"].get("SavedByAccountId", 1)
47-
else:
48-
saved_at, saved_by, description = None, 1, None
49-
5043
self.supports_join_in_progress = data['SupportsJoinInProgress']
5144
self.use_level_based_matchmaking = data['UseLevelBasedMatchmaking']
5245
self.use_age_based_matchmaking = data['UseAgeBasedMatchmaking']
5346
self.use_rec_royale_matchmaking = data['UseRecRoyaleMatchmaking']
5447
self.subroom_id = data['SubRoomId']
5548
self.room_id = data['RoomId']
56-
self.unity_scene_id = data['UnitySceneId']
49+
#self.unity_scene_id = data['UnitySceneId']
50+
self.last_moderated_save_moderation_state = data["LastModeratedSaveModerationState"]
5751
self.name = data['Name']
58-
self.data_blob = data.get("DataBlob", None)
59-
self.data_saved_at = saved_at
60-
self.data_saved_by = saved_by
61-
self.description = description
52+
#self.data_blob = data.get("DataBlob", None)
53+
#self.data_saved_at = saved_at
54+
#self.data_saved_by = saved_by
55+
#self.description = description
6256
self.is_sandbox = data['IsSandbox']
6357
self.max_players = data['MaxPlayers']
6458
self.accessibility = ACCESSIBILITY_DICT.get(data['Accessibility'])

0 commit comments

Comments
 (0)