fixed start after move
This commit is contained in:
@@ -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 $
|
||||
|
||||
Reference in New Issue
Block a user