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

Commit 716e46c

Browse files
committed
Remove old unused currency commands from economy cog
1 parent 626c539 commit 716e46c

1 file changed

Lines changed: 2 additions & 32 deletions

File tree

cogs/economy.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,47 +46,17 @@ def get_item_names(self) -> list:
4646
"Doctor"
4747
]
4848

49-
with open(f"{wdir}/database/currency.json", 'r') as f: currency = json.load(f)
49+
# with open(f"{wdir}/database/currency.json", 'r') as f: currency = json.load(f)
5050
with open(f"{wdir}/database/items.json", 'r') as f: items = json.load(f)
5151
with open(f"{wdir}/config/shop.json", 'r') as f: shopitem = json.load(f)
5252
with open(f"{wdir}/database/user_data.json", 'r') as f: userdat = json.load(f)
5353

5454
def save():
55-
with open(f"{wdir}/database/currency.json", 'w+') as f: json.dump(currency, f, indent=4)
55+
# with open(f"{wdir}/database/currency.json", 'w+') as f: json.dump(currency, f, indent=4)
5656
with open(f"{wdir}/database/items.json", 'w+') as f: json.dump(items, f, indent=4)
5757
with open(f"{wdir}/database/user_data.json", 'w+') as f: json.dump(userdat, f, indent=4)
5858

5959
# Functions
60-
def get_user_networth(user_id:int):
61-
nw = currency["wallet"][str(user_id)] + currency["bank"][str(user_id)]
62-
#for e in items[str(user_id)]:
63-
# if e != 0: nw += shopitem[e]["sell price"]
64-
return nw
65-
66-
def get_wallet(id: int) -> int:
67-
return currency['wallet'][str(id)]
68-
69-
def get_bank(id: int) -> int:
70-
return currency['bank'][str(id)]
71-
72-
def new_wallet(id: int):
73-
if str(id) not in currency['wallet']:
74-
currency['wallet'][str(id)] = 5000
75-
return 0
76-
else: return 1
77-
78-
def new_bank(id: int):
79-
if str(id) not in currency['bank']:
80-
currency['bank'][str(id)] = 0
81-
return 0
82-
else: return 1
83-
84-
def get_user_count():
85-
users = 0
86-
for x in currency["wallet"].keys():
87-
users += 1
88-
return users
89-
9060
def new_userdat(id: int):
9161
if str(id) not in userdat.keys():
9262
userdat[str(id)] = {"work_job": None}

0 commit comments

Comments
 (0)