mirror of
https://github.com/Specoolazius/mcserver-discordbot.git
synced 2024-11-24 22:39:42 +01:00
fixed restart communicate
This commit is contained in:
parent
e506424df3
commit
88c4bd1992
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user