telegram

Negative lookbehind + Non capturing group

Negative lookbehind + Non capturing group Question: (?<!")https://t.me/(c)?/?([+a-zA-Z0-9]+)/?([0-9]*)? I want to find all telegram links without quotation marks (") but I don’t want the leading negative lookbehind to be a group, how can I do this? I tried the following but it didn’t work. This code works but i want the initial negative lookbehind not …

Total answers: 1

How to Reply Message in Unknown ChatBot Telegram with Python?

How to Reply Message in Unknown ChatBot Telegram with Python? Question: I have a ChatBot in Telegram that forwards message from others to me and I can reply their messages by replying messages in bot. When I reply a message, the bot checks that message user id, and send my message to that id. But …

Total answers: 1

How to get a telegram bot work in a channel?

How to get a telegram bot work in a channel? Question: I can’t get it to work through properties like command or just content_types. No errors show up. @dp.message_handler(commands=["start"]) async def start(msg:Message): if msg.chat.type == ChatType.CHANNEL: await msg.answer(msg) I made so bot sent a message to the channel. Still nothing. P.S It works with getUpdates …

Total answers: 1

Some questions about using python-telegram-bot

Some questions about using python-telegram-bot Question: Some questions about using python-telegram-bot I’m using python-telegram-bot to create a telegram bot. I want to forward a graphic message (similar to the one below) to the robot, and the robot removes the image and returns the text. I didn’t find an example in the official documentation. I hope …

Total answers: 1

parsing telegram MessageMediaPoll and print it as readable text

parsing telegram MessageMediaPoll and print it as readable text Question: Good day every one, I’m trying to parse telegram poll data, I have the following: {‘_’: ‘MessageMediaPoll’, ‘poll’: {‘_’: ‘Poll’, ‘id’: 578954245254551900254, ‘question’: ‘Have you seen it ?! ‘, ‘answers’: [{‘_’: ‘PollAnswer’, ‘text’: ‘Lost’, ‘option’: [48]}, {‘_’: ‘PollAnswer’, ‘text’: ‘Am lose’, ‘option’: [49]}, {‘_’: ‘PollAnswer’, …

Total answers: 1

how to add a userbot to a group by link? python telegram api

how to add a userbot to a group by link? python telegram api Question: I get a link with which I need to add the bot to a group (private or public) I did not find anything that could help me my code: link = ‘https://t.me/+r….’ client = TelegramClient(session=’joiner’, api_id=api_id, api_hash=api_hash) #login process result = …

Total answers: 1

Send premium-emoji with Pyrogram

Send premium-emoji with Pyrogram Question: I need to send a premium emoji on the user’s account using Pyrogram. I tried to send with send_message() a list of MessageEntityCustomEmoji and MessageEntity. The first one gave the error ‘MessageEntityCustomEmoji’ object has no attribute ‘_client’, and the second one sent a message without an emoji. How do I …

Total answers: 1

Automatically edit last Telegram bot message after expiration period

Automatically edit last Telegram bot message after expiration period Question: I’m trying to figure out how I can set an "expiration timer" on a message sent by a Telegram bot, containing a few buttons. Long story short, there’s a function which selects a random picture from a folder, then sends it to a group, and …

Total answers: 2

Python-telegram-bot bypass flood and 429 error using Scrapy

Python-telegram-bot bypass flood and 429 error using Scrapy Question: I follow the price drops on the target site. If there is a price decrease in accordance with the rules I have set, it is recorded in the notificate table. From there, a telegram notification is sent through the code I created in the pipelines.py file. …

Total answers: 1

telegram bot reply message for buttons

telegram bot reply message for buttons Question: recently i created a telegram bot using python and i added keyboard button features to the bot. However, i am having difficulties in getting replies from bot to the buttons users choose. button7 = KeyboardButton(‘About Us’,request_contact= False) keyboard2 = ReplyKeyboardMarkup(resize_keyboard = True, one_time_keyboard = True).row(button7) @dp.message_handler(commands=[‘info’]) async def …

Total answers: 1