From 89a92586ffb4007cdf9fde20df443392e9195c85 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Mon, 26 Jul 2021 21:14:50 +0100 Subject: [PATCH] Hotfix --- app/Dockerfile | 3 +-- .../slashcommands/secondary/edit_membership.py | 2 +- app/debug/debug.py | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index a255a63..0bcc771 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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 diff --git a/app/cogs/slashcommands/secondary/edit_membership.py b/app/cogs/slashcommands/secondary/edit_membership.py index 647c511..aa7466e 100644 --- a/app/cogs/slashcommands/secondary/edit_membership.py +++ b/app/cogs/slashcommands/secondary/edit_membership.py @@ -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') diff --git a/app/debug/debug.py b/app/debug/debug.py index 46b89fb..57ee8ba 100644 --- a/app/debug/debug.py +++ b/app/debug/debug.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'