some minor changes

This commit is contained in:
bacon
2024-03-07 22:07:06 +03:00
parent 73cf9f3c6e
commit 84f4491861
7 changed files with 11 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ async def read_json(guild: int, _param: str):
:return: value of parameter.
"""
parameter = None
with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON
with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON
try:
_json = json.load(f) # Load the custom prefixes
except json.decoder.JSONDecodeError:
@@ -57,7 +57,7 @@ async def read_json(guild: int, _param: str):
async def write_json(guild: int, param_name: str, param: str or int):
with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f:
with open(os.getenv('CONF_FILE'), encoding='utf-8') as f:
try:
_json = json.load(f)
except json.decoder.JSONDecodeError:
@@ -80,7 +80,7 @@ def determine_prefix(bot, msg):
:return: prefix for server, default is $
"""
parameter = '$'
with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON
with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON
try:
_json = json.load(f) # Load the custom prefixes
except json.JSONDecodeError:
@@ -100,7 +100,7 @@ def determine_time(msg):
:return: prefix for server, default is $
"""
parameter = 15
with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON
with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON
try:
_json = json.load(f) # Load the custom prefixes
except json.JSONDecodeError: