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
|
if role.id == conf[str(ctx.guild.id)]['roles']['maintainer']: return True
|
||||||
return ctx.author.id == ctx.guild.owner_id
|
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(
|
@commands.command(
|
||||||
name='testconfig',
|
name='testconfig',
|
||||||
description='Tests the completeness of the configuration values of the current guild by comparing it to a configuration blueprint.',
|
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
|
self.client = client
|
||||||
|
|
||||||
#### Permission Check: Only available to the bot's maintainer.
|
#### Permission Check: Only available to the bot's maintainer.
|
||||||
async def cog_check(self, ctx):
|
async def cog_check(self, ctx:commands.Context):
|
||||||
return ctx.author.id == int(os.getenv('BOT_MAINTAINER_ID'))
|
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(
|
@commands.command(
|
||||||
name='migrate',
|
name='migrate',
|
||||||
|
Loading…
Reference in New Issue
Block a user