Skip to content

Commit

Permalink
Refactor code to use get_cog method for NSFW check
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed Jul 5, 2024
1 parent d8a4d32 commit fa70a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def predicate(ctx: Context) -> bool:

def is_adult() -> Check[Context]:
async def predicate(ctx: Context) -> bool:
cog: NSFW = ctx.bot.NSFW
cog: NSFW = ctx.bot.get_cog("NSFW")
if cog is None:
return True
is_adult = await cog.check_user_age(ctx)
Expand Down

0 comments on commit fa70a28

Please sign in to comment.