edditing code
This commit is contained in:
@@ -17,7 +17,7 @@ async def list_files(fold: str = 'audio'):
|
||||
return fl[2]
|
||||
|
||||
|
||||
async def read_json(guild: int, _param: str) -> int or str:
|
||||
async def read_json(guild: int, _param: str):
|
||||
"""
|
||||
Reads Json file to determite config strings
|
||||
:param guild: ID of Guild
|
||||
@@ -25,6 +25,7 @@ async def read_json(guild: int, _param: str) -> int or str:
|
||||
:return: value of parameter
|
||||
"""
|
||||
with open('prefix.json', 'r', encoding='utf-8') as fp: # Open the JSON
|
||||
parameter = None
|
||||
try:
|
||||
_json = json.load(fp) # Load the custom prefixes
|
||||
except TypeError:
|
||||
@@ -35,10 +36,9 @@ async def read_json(guild: int, _param: str) -> int or str:
|
||||
try:
|
||||
parameter = guild_conf[f"{_param}"]
|
||||
except:
|
||||
parameter = None
|
||||
pass
|
||||
except:
|
||||
pass
|
||||
|
||||
return parameter
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user