skip to Main Content

Telegram login blocked despite correct code – Python Telethon

I'm working on a Python project that uses Telethon to connect to Telegram. I have the following code for authentication: client = TelegramClient(phone, api_id, api_hash, flood_sleep_threshold=3) client.connect() if not client.is_user_authorized(): client.send_code_request(phone) client.sign_in(phone, input(f'Enter the code: {phone} : ')) The issue…

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