mirror of
https://github.com/Specoolazius/mcserver-discordbot.git
synced 2025-09-13 16:02:54 +02:00
fixed restart communicate
This commit is contained in:
@@ -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()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user