fixed start after move

This commit is contained in:
bacon
2024-03-18 02:08:16 +03:00
parent fff1a5c0c7
commit 76d1625346
3 changed files with 53 additions and 3 deletions

View File

@@ -37,6 +37,18 @@ async def read_json(guild: int, _param: str):
async def write_json(guild: int, param_name: str, param: str or int):
"""
A function to write JSON data to a file after updating or adding a parameter value.
Parameters:
- guild: an integer representing the guild ID
- param_name: a string representing the parameter name
- param: a string or integer representing the parameter value
Returns:
This function does not return anything.
"""
with open(getenv('CONF_FILE'), encoding='utf-8') as f:
try:
_json = load(f)
@@ -54,7 +66,8 @@ async def write_json(guild: int, param_name: str, param: str or int):
def determine_prefix(bot: commands.Bot, msg):
"""
Determite per-server bot prefix
Determine the per-server bot prefix based on the given message object.
:param bot: Disnake Bot object
:param msg: Disnake msg object
:return: prefix for server, default is $