diff --git a/bot/modules/study/studybadge_cmd.py b/bot/modules/study/studybadge_cmd.py index 7fe004aa..b43dae4b 100644 --- a/bot/modules/study/studybadge_cmd.py +++ b/bot/modules/study/studybadge_cmd.py @@ -94,6 +94,9 @@ async def cmd_studybadges(ctx, flags): # Pre-fetch the list of roles 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 to_delete = [] if flags['remove']: