Fix author not getting removed at quote index removal

This commit is contained in:
2021-03-02 11:44:41 +01:00
parent ced630f9a2
commit 02221b0790

4
bot.py
View File

@@ -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