Format Python code with psf/black push

github-actions 1 year ago
parent 05a54e28d6
commit 92f7632095

@ -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(

Loading…
Cancel
Save