diff --git a/redbot/core/_cog_manager.py b/redbot/core/_cog_manager.py index 9f195aa65c2..bd5f77fd01a 100644 --- a/redbot/core/_cog_manager.py +++ b/redbot/core/_cog_manager.py @@ -258,6 +258,12 @@ async def _find_core_cog(name: str) -> ModuleSpec: try: mod = import_module(real_name, package=package) + if mod.__spec__.name == "redbot.cogs.locales": + raise NoSuchCog( + "No core cog by the name of '{}' could be found.".format(name), + path=mod.__spec__.origin, + name=name, + ) except ImportError as e: if e.name == package + real_name: raise NoSuchCog(