This commit is contained in:
unknown 2023-06-03 18:37:36 +02:00
parent f6b94847d9
commit 2a700c98e9

View File

@ -13,9 +13,9 @@ from openai import OpenAIError
from redbot.core import Config, commands from redbot.core import Config, commands
def role_check(): def role_check():
async def predicate(ctx): def predicate(ctx):
cog = ctx.bot.get_cog("ReginaldCog") cog = ctx.bot.get_cog("ReginaldCog")
return await cog.has_admin_role(ctx) or await cog.has_allowed_role(ctx) return cog.has_admin_role(ctx) or cog.has_allowed_role(ctx)
return commands.check(predicate) return commands.check(predicate)
class ReginaldCog(commands.Cog): class ReginaldCog(commands.Cog):