def handle_temperature(update: Update): res, output, error = Util.execute("vcgencmd measure_temp") TelegramBotManager().bot.send_message(chat_id=update.message.chat_id, text=output)
def reboot_bot(*, telegram_id): Util.execute("reboot")
def shutdown_bot(*, telegram_id): Util.execute("shutdown now -h")
def exec_cmd_bot(*, telegram_id, command): res, output, error = Util.execute(command) if len(output) == 0: output = "Empty" return output