This commit is contained in:
2024-10-29 15:20:28 +01:00
parent eb2960aa10
commit e955ef4e28
34 changed files with 201 additions and 476 deletions

View File

@ -1,5 +1,5 @@
"""A collections of utilities used by Gwendolyn and her functions."""
__all__ = ["make_files","log"]
__all__ = ["make_files","log","PARAMS"]
from .util_functions import make_files, log
from .util_functions import make_files, log, PARAMS

View File

@ -23,6 +23,23 @@ handler.setFormatter(logging.Formatter(fmt=PRINTFORMAT, datefmt=DATEFORMAT))
printer.addHandler(handler)
printer.propagate = False
def get_params():
"""
Get the slash command parameters.
*Returns*
---------
params: dict
The parameters for every slash command.
"""
path = "gwendolyn/resources/slash_parameters.json"
with open(path, "r", encoding="utf-8") as file_pointer:
slash_parameters = json.load(file_pointer)
return slash_parameters
PARAMS = get_params()
def log(messages, channel: str = "", level: int = 20):
"""
Log something in Gwendolyn's logs.