My discord.py bot has an economy system in it, and you can get coins, but everyones balance(coin amount) connects to every server. Here is my code that deals with the .json
async def oAcc(user):
users = await get_bank_data()
if str(user.id) in users:
return False
else:
users[str(user.id)] = {}
users[str(user.id)]["bal"] = 100
with open("bank.json", "w") as f:
json.dump(users, f)
return True
async def get_bank_data():
with open("bank.json", "r") as f:
users = json.load(f)
return users
How do I change this up so each server has a different "database".