def status(bot: Bot, update: Update): user_id = update.effective_user.id reply = "*System Status:* operational\n\n" reply += "*Python version:* " + python_version() + "\n" if user_id in SUDO_USERS or user_id in SUPPORT_USERS or user_id == OWNER_ID: pingSpeed = pingme() reply += "*Ping speed:* " + str(pingSpeed) + "ms\n" reply += "*CAS API version:* " + str(cas.vercheck()) + "\n" reply += "*GitHub API version:* " + str(git.vercheck()) + "\n" update.effective_message.reply_text(reply, parse_mode=ParseMode.MARKDOWN)
def status(update: Update, context: CallbackContext): user_id = update.effective_user.id reply = "*System Status:* `operational`\n\n" reply += "*Python version:* `" + python_version() + "`\n" reply += ( "*python-telegram-bot:* `" + str( subprocess.check_output( r"pip show python-telegram-bot | grep Version\:", shell=True ).decode() ).split()[1] + "`\n" ) reply += "*CAS API version:* `" + str(cas.vercheck()) + "`\n" reply += "*GitHub API version:* `" + str(git.vercheck()) + "`\n" update.effective_message.reply_text(reply, parse_mode=ParseMode.MARKDOWN)
def get_version(bot: Bot, update: Update): msg = update.effective_message ver = cas.vercheck() msg.reply_text("CAS API version: " + ver) return
def get_version(update: Update, context: CallbackContext): bot = context.bot msg = update.effective_message ver = cas.vercheck() msg.reply_text("CAS API version: " + ver) return