Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

Commit 2c37020

Browse files
committed
Add method to get treasury amount in CurrencyAPI
1 parent 9e3b384 commit 2c37020

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

framework/isobot/currency.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class CurrencyAPI(Colors):
2424
- treasury_remove(amount)
2525
- get_wallet(user)
2626
- get_bank(user)
27+
- get_treasury()
2728
- get_user_networth(user)
2829
- get_user_count
2930
- new_wallet(user)
@@ -140,6 +141,11 @@ def get_bank(self, user: discord.User) -> int:
140141
"""Returns the amount of coins in the user's bank account."""
141142
with open(self.db_path, 'r') as f: currency = json.load(f)
142143
return int(currency["bank"][str(user)])
144+
145+
def get_treasury(self) -> int:
146+
"""Returns the amount of coins in the treasury."""
147+
with open(self.db_path, 'r') as f: currency = json.load(f)
148+
return int(currency["treasury"])
143149

144150
def get_user_networth(self, user: discord.User) -> int:
145151
"""Returns the net-worth of the user."""

0 commit comments

Comments
 (0)