fix (studybadges): Fix empty badge removal error.

This commit is contained in:
2021-09-27 21:43:42 +03:00
parent f17a2d839a
commit 5ca10d5f74

View File

@@ -94,6 +94,9 @@ async def cmd_studybadges(ctx, flags):
# Pre-fetch the list of roles # Pre-fetch the list of roles
guild_roles = study_badges.fetch_rows_where(guildid=ctx.guild.id, _extra="ORDER BY required_time ASC") guild_roles = study_badges.fetch_rows_where(guildid=ctx.guild.id, _extra="ORDER BY required_time ASC")
if not guild_roles:
return await ctx.error_reply("There are no studybadges to remove!")
# Input handling, parse or get the list of rows to delete # Input handling, parse or get the list of rows to delete
to_delete = [] to_delete = []
if flags['remove']: if flags['remove']: