From f56773b2e143f9160273799d2fe2d94a190b1fe6 Mon Sep 17 00:00:00 2001 From: Migatu Date: Wed, 19 Jun 2024 18:46:40 +0200 Subject: [PATCH] test2 --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 60b76c5..5f3619b 100644 --- a/bot.py +++ b/bot.py @@ -19,6 +19,7 @@ import shutil import sys import threading import uuid +import subprocess from datetime import datetime from logging import handlers from pathlib import Path, PurePath @@ -1374,8 +1375,8 @@ async def zrestartuj_radio(ctx): if not allowed: await ctx.send("Łapy precz od radia") else: - result = os.system('/home/pi/Conjurer/restart_radio.sh') - await ctx.send(f'Wynik {result}') + retcode = subprocess.call("/home/pi/Conjurer/restart_radio.sh", shell=True) + await ctx.send(f'Wynik {retcode}') @client.hybrid_command(