Update highscores.py to use new data classes.
This commit is contained in:
@@ -38,6 +38,15 @@ class HighscoresData:
|
||||
data[guild_id] = guild_obj.to_dict()
|
||||
return "Highscores Data\n" + json.dumps(data, indent=4)
|
||||
|
||||
@property
|
||||
def guilds(self) -> "list[Guild]":
|
||||
"""
|
||||
Getter for Guilds list.
|
||||
|
||||
Returns:
|
||||
list[Guild]: List of Guilds tracked by Highscores Bot
|
||||
"""
|
||||
|
||||
def add_guild(self, guild_id: int) -> None:
|
||||
"""
|
||||
Creates a new Guild and adds to Guild map.
|
||||
|
||||
Reference in New Issue
Block a user