skip to Main Content

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
Back To Top
Search