mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:03:12 +00:00
Fix restart command outputs
The restart command no longer tries to output the script's echo commands wait ctx.respond() because this isn't possible when the bot is restarting.
This commit is contained in:
parent
7636d9d6f9
commit
49245784a3
1 changed files with 5 additions and 5 deletions
|
@ -26,12 +26,12 @@ class Basic(commands.Cog):
|
|||
)
|
||||
@commands.check(universal.owner_check)
|
||||
async def restart(self, ctx):
|
||||
try:
|
||||
output = subprocess.check_output(["/bin/bash", "racu_update.sh"])
|
||||
except subprocess.CalledProcessError as e:
|
||||
output = f"ERROR!!!\n{e.output.decode()}"
|
||||
await ctx.respond(content="Restarting..", ephemeral=True)
|
||||
|
||||
await ctx.respond(f"Script executed:\n```\n{output}\n```", ephemeral=True)
|
||||
try:
|
||||
print(subprocess.check_output(["/bin/bash", "racu_update.sh"]))
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error executing the script: {e.output.decode()}")
|
||||
|
||||
@commands.slash_command(
|
||||
name="intro",
|
||||
|
|
Loading…
Reference in a new issue