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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user