fixed restart communicate

This commit is contained in:
Specoolazius 2022-04-02 22:10:09 +02:00
parent e506424df3
commit 88c4bd1992

View File

@ -39,5 +39,7 @@ class Admin(discord.Cog):
@__dev_group.command(name='restart') @__dev_group.command(name='restart')
async def __restart_service(self, ctx: discord.ApplicationContext) -> None: async def __restart_service(self, ctx: discord.ApplicationContext) -> None:
await ctx.respond('attempting restart...') 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()