Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Jan 3, 2023
2 parents 55d2fc2 + 92f7632 commit 6b98b9a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions models/check_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
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)
Expand All @@ -28,7 +29,8 @@ async def inner(ctx: discord.ApplicationContext):

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(
Expand All @@ -43,7 +45,8 @@ async def inner(ctx: discord.ApplicationContext):

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(
Expand Down

0 comments on commit 6b98b9a

Please sign in to comment.