From 79cee26143520993c1abe01b62f22168a3fd5f7b Mon Sep 17 00:00:00 2001 From: snipe_blaze <72265661+notsniped@users.noreply.github.com> Date: Sun, 21 Aug 2022 15:10:09 +0530 Subject: [PATCH] Assign `currency:dict` to loaded database --- framework/isobot/currency.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/isobot/currency.py b/framework/isobot/currency.py index c01905d0..36d8d409 100644 --- a/framework/isobot/currency.py +++ b/framework/isobot/currency.py @@ -19,6 +19,9 @@ class CurrencyAPI(Colors): - withdraw(user, amount)""" def __init__(self, db_path:str): self.db_path = db_path + with open(self.db_path, 'w+') as f: + global currency + currency = json.load(f) print(f"[Framework/Loader] {Colors.green}CurrencyAPI initialized.{Colors.end}") def save(self): """Saves databases cached on memory."""