skip to Main Content

Telegram – Markdown_V2 support for update.message.reply_text

edit: as for importing question: from telegram.constants import ParseMode I have this code below, everything works otherwise if I remove the parse_mode bit (besides bold etc): await update.message.reply_text(await main_menu_message(), reply_markup=await main_menu_keyboard(), parse_mode=telegram.constants.ParseMode.MARKDOWN_V2) and have imported everything - here is the…

VIEW QUESTION

Parse mode in Python Telegram Bot

I wanted it to be automatically copied after sending this message when clicking on context.user_data["code"] So I used `` and parse_mode="MarkdownV2" await context.bot.send_message( chat_id=CHANEL_ID, text= f"{context.user_data['key']}nnCode: `{context.user_data['code']}`nnMod: {context.user_data['mod']}nnby: @{update.effective_user.username}", parse_mode='MarkdownV2' ) But if username of the user has _ like:…

VIEW QUESTION
Back To Top
Search