def restart(update, context):
    restart_message = sendMessage("Restarting, Please wait!", context.bot, update)
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(restart_message, status)
    execl(executable, executable, "-m", "bot")
Esempio n. 2
0
def restart(update, context):
    restart_message = sendMessage("<b>⛽ Rᴇsᴛᴀʀᴛɪɴɢ Mʏ Sᴇʀᴠɪᴄᴇs, Pʟᴇᴀsᴇ Wᴀɪᴛ!</b>", context.bot, update)
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(restart_message, status)
    execl(executable, executable, "-m", "bot")
Esempio n. 3
0
def restart(update, context):
    restart_message = sendMessage("РЏй­ЮљЉ­Юљъ­Юљг­ЮљГ­Юљџ­ЮљФ­ЮљГ­Юљб­ЮљД­Юља ­ЮљЊ­ЮљА­Юљъ ­ЮљЂ­Юље­ЮљГ..., ­ЮљЈ­ЮљЦ­Юљъ­Юљџ­Юљг­Юљъ ­Юљќ­Юљџ­Юљб­ЮљГ", context.bot, update)
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(restart_message, status)
    execl(executable, executable, "-m", "bot")
Esempio n. 4
0
def restart(update, context):
    restart_message = sendMessage("Restarting, Please wait!", context.bot, update)
    # Save restart message object in order to reply to it after restarting
    with open(".restartmsg", "w") as f:
        f.truncate(0)
        f.write(f"{restart_message.chat.id}\n{restart_message.message_id}\n")
    fs_utils.clean_all()
    os.execl(executable, executable, "-m", "bot")
def restart(update, context):
    restart_message = sendMessage("Đang khởi động lại, vui lòng chờ một chút",
                                  context.bot, update)
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(restart_message, status)
    execl(executable, executable, "-m", "bot")
Esempio n. 6
0
def restart(update, context):
    restart_message = sendMessage("🤯𝚁𝚎𝚜𝚝𝚊𝚛𝚝𝚒𝚗𝚐, 𝙿𝚕𝚎𝚊𝚜𝚎 𝚠𝚊𝚒𝚝...❗️", context.bot,
                                  update)
    LOGGER.info(f'Restarting the Bot...')
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(restart_message, status)
    execl(executable, executable, "-m", "bot")
Esempio n. 7
0
def _restart(reply):
    # Save restart message object in order to reply to it after restarting
    fs_utils.clean_all()
    with open('restart.pickle', 'wb') as status:
        pickle.dump(reply, status)
    execl(executable, executable, "-m", "bot")