forked from viveksantayana/geas-bot
Getting better?
This commit is contained in:
parent
dcf0fec7ac
commit
cc0b3c6bb9
@ -24,9 +24,6 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
if role.id == conf[str(ctx.guild.id)]['roles']['maintainer']: return True
|
||||
return ctx.author.id == ctx.guild.owner_id
|
||||
|
||||
async def cog_check(self, ctx):
|
||||
return ctx.author.id == int(os.getenv('BOT_MAINTAINER_ID'))
|
||||
|
||||
@commands.command(
|
||||
name='testconfig',
|
||||
description='Tests the completeness of the configuration values of the current guild by comparing it to a configuration blueprint.',
|
||||
|
@ -16,8 +16,12 @@ class Migrate(commands.Cog, name='Migrate Command'):
|
||||
self.client = client
|
||||
|
||||
#### Permission Check: Only available to the bot's maintainer.
|
||||
async def cog_check(self, ctx):
|
||||
return ctx.author.id == int(os.getenv('BOT_MAINTAINER_ID'))
|
||||
async def cog_check(self, ctx:commands.Context):
|
||||
conf = yaml_load(configFile)
|
||||
for role in ctx.author.roles:
|
||||
if 'maintainer' in conf[str(ctx.guild.id)]['roles']:
|
||||
if role.id == conf[str(ctx.guild.id)]['roles']['maintainer']: return True
|
||||
return ctx.author.id == ctx.guild.owner_id
|
||||
|
||||
@commands.command(
|
||||
name='migrate',
|
||||
|
Loading…
Reference in New Issue
Block a user