diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py index a9efbf27303..8cda7bd3f10 100644 --- a/redbot/cogs/warnings/warnings.py +++ b/redbot/cogs/warnings/warnings.py @@ -427,9 +427,9 @@ async def warn( "The person you're trying to warn is equal or higher than you in the discord hierarchy, you cannot warn them." ) ) - guild_settings = await self.config.guild(ctx.guild).all() custom_allowed = guild_settings["allow_custom_reasons"] + reason_type = None async with self.config.guild(ctx.guild).reasons() as registered_reasons: if (reason_type := registered_reasons.get(reason.lower())) is None: