From 88c4bd19920d541af6d23991c5077d1bd216678b Mon Sep 17 00:00:00 2001 From: Specoolazius Date: Sat, 2 Apr 2022 22:10:09 +0200 Subject: [PATCH] fixed restart communicate --- bot/extensions/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/extensions/admin.py b/bot/extensions/admin.py index ac55018..ac67a5b 100644 --- a/bot/extensions/admin.py +++ b/bot/extensions/admin.py @@ -39,5 +39,7 @@ class Admin(discord.Cog): @__dev_group.command(name='restart') async def __restart_service(self, ctx: discord.ApplicationContext) -> None: await ctx.respond('attempting restart...') - await asyncio.create_subprocess_shell(f'sudo systemctl restart') + self.bot.logger.info('Restarting bot...') + process = await asyncio.create_subprocess_shell(cmd='sudo systemctl restart') + await process.communicate()