Hotfix
This commit is contained in:
parent
7916b1fca6
commit
89a92586ff
@ -1,5 +1,4 @@
|
||||
FROM python:3.9.6-alpine
|
||||
COPY . /usr/src/app
|
||||
FROM python:3.9.6-buster
|
||||
WORKDIR /usr/src/app
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r requirements.txt
|
||||
|
@ -55,7 +55,7 @@ class EditMembership(commands.Cog, name='Edit Membership'):
|
||||
if role.id in conf[str(ctx.guild.id)]['membership']:
|
||||
conf[str(ctx.guild.id)]['membership'].remove(role.id)
|
||||
yaml_dump(conf, configFile)
|
||||
await ctx.send(f'```Membership type {role.name} has been deleted for the guild `{ctx.guild.name}`.```')
|
||||
await ctx.send(f'```Membership type {role.name} has been deleted for the guild `{ctx.guild.name}`.```', hidden=True)
|
||||
await role.delete(reason=f'`/config membership remove` command issued by `{ctx.author.display_name}`.')
|
||||
if not any([x['membership'] for x in yaml_load(configFile).values()]):
|
||||
unloadCog(f'./{cogsDir}/slashcommands/secondary/edit_membership.py')
|
||||
|
@ -57,7 +57,7 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
async def _retrievecommands(self, ctx:commands.Context):
|
||||
c = await utils.manage_commands.get_all_commands(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_id=ctx.guild.id
|
||||
)
|
||||
pprint(c)
|
||||
@ -73,32 +73,32 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
if command == '--all' or command == '-a':
|
||||
await utils.manage_commands.remove_all_commands(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_ids=[ ctx.guild.id ]
|
||||
)
|
||||
await ctx.reply(f'```All slash commands have been deleted for the guild `{ctx.guild.name}``.```')
|
||||
elif command == '--global' or command == '-g':
|
||||
await utils.manage_commands.remove_all_commands(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_ids=None
|
||||
)
|
||||
await utils.manage_commands.remove_all_commands(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_ids=[ int(g) for g in yaml_load(configFile)]
|
||||
)
|
||||
await ctx.reply('```All slash commands have been deleted globally.```')
|
||||
else:
|
||||
c = await utils.manage_commands.get_all_commands(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_id=ctx.guild.id
|
||||
)
|
||||
target = list(filter(lambda t: t['name'] == command, c))[0]['id']
|
||||
await utils.manage_commands.remove_slash_command(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_id=ctx.guild.id,
|
||||
cmd_id=target
|
||||
)
|
||||
@ -113,7 +113,7 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
async def _addCommand(self, ctx:commands.Context, command:str, key:str=''):
|
||||
await utils.manage_commands.add_slash_command(
|
||||
bot_id=self.client.user.id,
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
bot_token=os.getenv('BOT_TOKEN'),
|
||||
guild_id= None if key == '--global' or key == '-g' else ctx.guild.id,
|
||||
cmd_name=command,
|
||||
description='No Description'
|
||||
|
Loading…
Reference in New Issue
Block a user