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")
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")
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")
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")
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")
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")