edditing code

This commit is contained in:
2022-08-23 20:44:19 +03:00
parent 10990a86a4
commit 8ac74ccd44
9 changed files with 133 additions and 53 deletions

View File

@@ -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