From 92f76320952ca4c3ff1cb964bef65f0389d81125 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Tue, 3 Jan 2023 01:40:50 +0000 Subject: [PATCH] Format Python code with psf/black push --- models/check_model.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/models/check_model.py b/models/check_model.py index 04931e5..e3b0e17 100644 --- a/models/check_model.py +++ b/models/check_model.py @@ -12,7 +12,8 @@ ALLOWED_GUILDS = EnvService.get_allowed_guilds() class Check: def check_admin_roles() -> Callable: async def inner(ctx: discord.ApplicationContext): - if ADMIN_ROLES == [None]: return True + if ADMIN_ROLES == [None]: + return True if not any(role.name.lower() in ADMIN_ROLES for role in ctx.user.roles): await ctx.defer(ephemeral=True) @@ -28,7 +29,8 @@ class Check: def check_dalle_roles() -> Callable: async def inner(ctx: discord.ApplicationContext): - if DALLE_ROLES == [None]: return True + if DALLE_ROLES == [None]: + return True if not any(role.name.lower() in DALLE_ROLES for role in ctx.user.roles): await ctx.defer(ephemeral=True) await ctx.respond( @@ -43,7 +45,8 @@ class Check: def check_gpt_roles() -> Callable: async def inner(ctx: discord.ApplicationContext): - if GPT_ROLES == [None]: return True + if GPT_ROLES == [None]: + return True if not any(role.name.lower() in GPT_ROLES for role in ctx.user.roles): await ctx.defer(ephemeral=True) await ctx.respond(