F
Size: a a a
F
G
G
АК
АК
G
АК
G
АК
S
S
<Ч
S
<Ч
<Ч
@dp.message_handler(is_superuser=True, commands='restart')
async def restart(message: types.Message):
def tread_stop(sec=1):
import time
time.sleep(sec)
# noinspection PyProtectedMember
os._exit(1)
msg = f"Exited by superuser {message.from_user.id} command /restart"
logger.warning(msg)
import threading
threading.Thread(target=tread_stop, args=()).start()
s
А
D
<Ч
А