diff --git a/extensions/highscores.py b/extensions/highscores.py index b9b8d87..007bb3b 100644 --- a/extensions/highscores.py +++ b/extensions/highscores.py @@ -17,7 +17,8 @@ async def handle_error(error): @commands.command( description="Highscores", help="Shows a bar graph of users in this channel and how many messages they have sent.", - brief="Display chat highscores" + brief="Display chat highscores", + aliases=["highscore"] ) async def highscores(ctx, limit=0): filename = str(ctx.channel.id) + ".log" @@ -71,7 +72,8 @@ async def highscores(ctx, limit=0): @commands.command( description="Highscores Server", help="Shows a bar graph of users across all servers I am in and how many messages they have sent.", - brief="Display chat highscores" + brief="Display chat highscores", + aliases=["highscore_server"] ) async def highscores_server(ctx, limit=0): @@ -111,8 +113,10 @@ async def highscores_server(ctx, limit=0): print(user_message_counts) print("printed") user_message_counts = remove_dict_keys_if_less_than_x(user_message_counts,limit) - keys = list(user_message_counts.keys()) - values = list(user_message_counts.values()) + keys = user_message_counts.keys() + print(keys) + values = user_message_counts.values() + print(values) fig, ax = plt.subplots() bar_container = ax.barh(keys, values) ax.set_xlabel("Message Count") diff --git a/sparkytron3000.py b/sparkytron3000.py index aba7cf4..45b5a6a 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -159,7 +159,7 @@ async def folder_setup(): os.mkdir(folder_name) return folder_names -async def delete_all_files(path, safe_folders): +async def delete_all_files(path, safe_folders=None): for filename in os.listdir(path): if os.path.isdir(path+filename) and not path+filename in safe_folders: shutil.rmtree(path+filename)