Fix author not getting removed at quote index removal
This commit is contained in:
4
bot.py
4
bot.py
@@ -335,6 +335,10 @@ async def quote_remove_command(ctx: commands.Context, author: str, quote: str):
|
|||||||
try:
|
try:
|
||||||
quote = int(quote)
|
quote = int(quote)
|
||||||
quotes[author].pop(quote)
|
quotes[author].pop(quote)
|
||||||
|
if not quotes[author]:
|
||||||
|
quotes.pop(author)
|
||||||
|
await ctx.channel.send("Successfully removed quote!")
|
||||||
|
config_save()
|
||||||
return
|
return
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user