Add get_table function.

This commit is contained in:
alwayscompiling
2022-08-01 21:21:57 -04:00
parent aa4b06c125
commit 109b22be62
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -94,6 +94,10 @@ class Guild:
if table.name not in self._table_map:
self._table_map[table.name] = table
def get_table(self, table_name: str) -> Table:
"""Getter for specific table."""
return self._table_map[table_name]
def to_dict(self) -> dict:
"""
Creates python dictionary object from class data.
+1 -1
View File
@@ -53,7 +53,7 @@ class Table:
self._categories_map[category.name] = category
def get_category(self, category_name: str) -> Category:
"""Retrieves category with the gven name."""
"""Getter for specific category."""
return self._categories_map[category_name]
def to_dict(self) -> dict: