Getting better?

This commit is contained in:
Vivek Santayana 2021-08-04 15:24:39 +01:00
parent dcf0fec7ac
commit cc0b3c6bb9
2 changed files with 6 additions and 5 deletions

View File

@ -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.',

View File

@ -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',