Added a to_str function for all classes. __str__ function uses it. highscores_data uses the to_str function for saving.

This commit is contained in:
alwayscompiling
2022-08-03 22:35:27 -04:00
parent 66ace947c6
commit 6f4322bf6a
5 changed files with 41 additions and 5 deletions
+1 -1
View File
@@ -125,4 +125,4 @@ class HighscoresData:
with open(
f"{HIGHSCORES_DATA_DIR}/{guild.guild_id}.json", encoding="utf-8", mode="w"
) as file:
file.write(guild) # should use str function
file.write(guild.to_str()) # should use str function