From 02221b0790c5332d6afae6e9c07ce4f170fcc4c8 Mon Sep 17 00:00:00 2001 From: Siphalor Date: Tue, 2 Mar 2021 11:44:41 +0100 Subject: [PATCH] Fix author not getting removed at quote index removal --- bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot.py b/bot.py index e9ba0c9..39659ef 100644 --- a/bot.py +++ b/bot.py @@ -335,6 +335,10 @@ async def quote_remove_command(ctx: commands.Context, author: str, quote: str): try: quote = int(quote) quotes[author].pop(quote) + if not quotes[author]: + quotes.pop(author) + await ctx.channel.send("Successfully removed quote!") + config_save() return except ValueError: pass