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

How to create topics in telegram chat with telethon

`@loader.tds class testr(loader.Module): '''name''' strings = { "name": "test", } async def client_ready(self, client, db): self.test_channel, _ = await utils.asset_channel( self._client, "Test - chat", "check descr", silent=True, archive=True, _folder="m", ) await self.client(functions.channels.InviteToChannelRequest(self.test_channel, ['@my_bot'])) await self.client(functions.channels.EditAdminRequest( channel=self.test_channel, user_id="@my_bot", admin_rights=ChatAdminRights(ban_users=True, post_messages=True, edit_messages=True),…

VIEW QUESTION

Telegram hash validation in Java

For the sake of me, I can't get to validate a Telegram hash in Java. I have a working JS example compiled from different sources that I've reduced to barebones to illustrate this question. function main() { var k =…

VIEW QUESTION
Back To Top
Search