INNER CODE UNIT · Python

msg

TechXueXi/TechXueXi · SourcePackages/telegramListener.py:93

        msg = os.popen(shell).readlines()[-1]
        if "up to date" in msg:
            bot.send_message(message.chat.id, "当前代码已经是最新的了")
        else:
            os.popen("cp -r /xuexi/code/TechXueXi/SourcePackages/* /xuexi")
            bot.send_message(message.chat.id, "代码更新完成"+msg)
    except Exception as e:
        bot.send_message(message.chat.id, "更新失败:"+str(e))


@bot.message_handler(commands=['v'], func=authorize)
def rep_update(message):
    bot.reply_to(message, "当前版本:v0.10.29")


def polling():
    try:
        bot.polling(non_stop=True, timeout=120)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…