some minor changes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user