sigh
This commit is contained in:
parent
e953bcc896
commit
f96ed87d20
@ -34,14 +34,10 @@ class ReginaldCog(commands.Cog):
|
||||
|
||||
def has_admin_role():
|
||||
async def predicate(ctx):
|
||||
#janitor_role_id = 672156832323600396
|
||||
#has_janitor_role = any(role.id == janitor_role_id for role in ctx.author.roles) # Uncomment this line
|
||||
has_admin_permission = ctx.author.guild_permissions.administrator
|
||||
#return has_janitor_role or has_admin_permission
|
||||
return has_admin_permission
|
||||
return commands.check(predicate)
|
||||
|
||||
|
||||
@commands.guild_only()
|
||||
@commands.has_permissions(manage_guild=True)
|
||||
@commands.command(help="Set the OpenAI API key")
|
||||
|
||||
@ -2,4 +2,5 @@ from .trafficCog import TrafficCog
|
||||
from redbot.core.bot import Red
|
||||
|
||||
async def setup(bot: Red):
|
||||
await bot.add_cog(TrafficCog(bot))
|
||||
cog = TrafficCog(bot)
|
||||
await bot.add_cog(cog)
|
||||
Loading…
x
Reference in New Issue
Block a user