diff --git a/customcommands.json b/customcommands.json index b4d7717..babed61 100644 --- a/customcommands.json +++ b/customcommands.json @@ -1,8 +1,3 @@ { - "!test": "This is a test!", - "tannerisawesome": "He truly is.", - "test2": "This is another test!", - "[": "' t e s t 3 ' , ' t h i s ' , ' i s ' , ' y e t ' , ' a n o t h e r ' , ' t e s t ! ' ]", - "test4": "this is another test!", - "aldan": "Aldan sucks at coding!" + "tannerisawesome": "He truly is." } \ No newline at end of file diff --git a/methods.py b/methods.py index 95fa0a4..669fc32 100644 --- a/methods.py +++ b/methods.py @@ -67,7 +67,12 @@ async def cmd_listcommands(ctx): commands_list = "\n".join([f"{PREFIX}**{cmd}**" for cmd, resp in commands_dict.items()]) customcommands_list = "\n".join([f"{PREFIX}**{cmd}**" for cmd, resp in customcommands_dict.items()]) - await ctx.send(f"**Available Built-In Commands:**\n\n{commands_list}\n\n**Available Custom Commands:**\n\n{customcommands_list}\n\n") + await ctx.send(f"**Available Built-In Commands:**\n\n{commands_list}") + + with open ("customcommands.json", 'r') as file: + data = json.load(file) + if data != {}: + await ctx.send(f"\n\n**Available Custom Commands:**\n\n{customcommands_list}\n\n") except Exception as e: await ctx.send(f"Error loading commands: {e}")