diff --git a/framework/isobot/db/automod.py b/framework/isobot/db/automod.py index 9b803e6..564e773 100644 --- a/framework/isobot/db/automod.py +++ b/framework/isobot/db/automod.py @@ -2,12 +2,13 @@ # Imports import json +from framework.isobot.colors import Colors as colors # Functions class Automod(): """Initializes the Automod database system.""" def __init__(self): - print("[framework/db/Automod] Automod db library initialized.") + print(f"[framework/db/Automod] {colors.green}Automod db library initialized.{colors.end}") def load(self) -> dict: """Fetches and returns the latest data from the items database.""" diff --git a/framework/isobot/db/items.py b/framework/isobot/db/items.py index 8dc6a80..cf19cc9 100644 --- a/framework/isobot/db/items.py +++ b/framework/isobot/db/items.py @@ -1,6 +1,7 @@ """The framework module library used for managing isobot's items database.""" # Imports import json +from framework.isobot.colors import Colors as colors from framework.isobot.shop import ShopData # Variables @@ -11,7 +12,7 @@ class Items(): """Used to initialize the items database.""" def __init__(self): - print("[framework/db/Levelling] Items db library initialized.") + print(f"[framework/db/Levelling] {colors.green}Items db library initialized.{colors.end}") def load(self) -> dict: """Fetches and returns the latest data from the items database.""" diff --git a/framework/isobot/db/levelling.py b/framework/isobot/db/levelling.py index 0b02251..e891130 100644 --- a/framework/isobot/db/levelling.py +++ b/framework/isobot/db/levelling.py @@ -1,12 +1,13 @@ """The framework module library used for managing isobot's levelling database.""" # Imports import json +from framework.isobot.colors import Colors as colors # Functions class Levelling(): """Used to initialize the levelling database.""" def __init__(self): - print("[framework/db/Levelling] Levelling db library initialized.") + print(f"[framework/db/Levelling] {colors.green}Levelling db library initialized.{colors.end}") def load(self) -> dict: """Fetches and returns the latest data from the levelling database.""" diff --git a/framework/isobot/db/presence.py b/framework/isobot/db/presence.py index 83036ec..0c5eb26 100644 --- a/framework/isobot/db/presence.py +++ b/framework/isobot/db/presence.py @@ -3,13 +3,14 @@ # Imports import json import time +from framework.isobot.colors import Colors as colors # Functions class Presence(): """Used to initialize the User Presence system.""" def __init__(self): - print("[framework/db/UserData] Presence database initialized.") - + print(f"[framework/db/UserData] {colors.green}Presence database initialized.{colors.end}") + def load(self) -> dict: """Fetches and returns the latest data from the presence database.""" with open("database/presence.json", 'r', encoding="utf8") as f: db = json.load(f) diff --git a/framework/isobot/db/userdata.py b/framework/isobot/db/userdata.py index a5c3f58..78b8f38 100644 --- a/framework/isobot/db/userdata.py +++ b/framework/isobot/db/userdata.py @@ -2,12 +2,13 @@ # Imports import json +from framework.isobot.colors import Colors as colors # Functions class UserData(): """Used to initialize the UserData system.""" def __init__(self): - print("[framework/db/UserData] UserData library initialized.") + print(f"[framework/db/UserData] {colors.green}UserData library initialized.{colors.end}") def load(self) -> dict: """Fetches and returns the latest data from the levelling database.""" diff --git a/framework/isobot/db/weather.py b/framework/isobot/db/weather.py index 4094825..852fde9 100644 --- a/framework/isobot/db/weather.py +++ b/framework/isobot/db/weather.py @@ -1,20 +1,13 @@ # Imports import json +from framework.isobot.colors import Colors as colors from discord import User -# Classes -class Colors: - """Contains general stdout colors.""" - cyan = '\033[96m' - red = '\033[91m' - green = '\033[92m' - end = '\033[0m' - # Functions -class Weather(Colors): +class Weather(): """Class to manage the weather db""" def __init__(self): - print(f"[Framework/Loader] {Colors.green}Weather database initialized.{Colors.end}") + print(f"[Framework/Loader] {colors.green}Weather database initialized.{colors.end}") def load(self) -> dict: """Fetches and returns the latest data from the levelling database."""