diff --git a/aurora/aurora.py b/aurora/aurora.py index 20bff21..63900ef 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -13,6 +13,7 @@ from datetime import datetime, timedelta, timezone from math import ceil import discord +from class_registry.registry import RegistryKeyError from dateutil.parser import ParserError, parse from discord.ext import tasks from redbot.core import app_commands, commands, data_manager @@ -1122,9 +1123,10 @@ class Aurora(commands.Cog): async def aurora_settings_type(self, ctx: commands.Context, moderation_type: str): """Manage configuration options for specific moderation types. - See [the documentation](https://seacogs.coastalcommits.com/Aurora/Types) for a list of built-in moderation types.""" - registered_type = type_registry.get(moderation_type) - if not registered_type: + See [the documentation](https://seacogs.coastalcommits.com/Aurora/Types) for a list of built-in moderation types, or run this command with a junk argument (`awasd` or something) to see a list of valid types.""" + try: + registered_type = type_registry.get(moderation_type) + except RegistryKeyError: types = "`, `".join(type_registry.keys()) await ctx.send(error("`moderation_type` is not a valid moderation type.\nValid types are:\n" + types)) return