How to find all Telegram channels by name mask? - search

I'm trying to find all existing Telegram channels by a keyword (i.e. 'linux') in order to further subscribe on them.
This solution provides only the channels I'm already subscribed on.
Have tried to use both Telethon and Pyrogram but strangely enough I can't find any related API methods at all, there is no documentation and no code examples for such a simple task.
There is "Global search" in Telegram client where you can find such channels, and also there are some bots to help with such a task, but how can it be done from the code?

Related

How to brodcast custom messages using python-telegram-bot

I am new to Python. I want to broadcast a custom message to the users who registered my bot in a group or in private / personal.
How to do that function? Please help me - thank you
basically, you'll have to keep track of all the user/chat_ids of the groups/chats you bot is a member in. Then for broadcasting, you'll have to iterate over all of them and send a message to each.
The bot API offers neither a functionality to send messages to a bunch of chat_ids at once nor to get all chat_ids where your bot is currently a member in.
In fact, we have some information about such use cases over at the wiki of python-telegram-bot.
However, the logic is mainly implementation independent, i.e. you'd have to apply the same logic if you were to implement your bot with another python library or even a completely different programming language :)
Disclaimer: I'm currently the maintainer of python-telegram-bot.

How to get the Group chat added member list from ChatBot in msteams

how to collect all the group chat members from the chat bot using MSTeams?
You can use the GetPagedMembers capability for this - see the docs from Microsoft here: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=dotnet (switch to your language of choice in the samples blocks).
Note that, using this approach, you can only do this when the user is actually interacting with the bot (e.g. posting a message) because you need the context. If that's a problem let me know and I will send additional info.
Here are the two ways that can work for you
Using graph - List members of a chat. Refer this sample.
Get conversation member. (you are already aware about this as I can see.)

Callback for user's responses in a telegram bot (Telegraf)

I'm coding a telegram bot with Telegraf on node.js and I need to get some information about users. For example, the bot is asking them where they are from. Then, I want to wait for the user's response and store it in my db. However, I don't understand how to achieve that since I can't just use a bot.on('text', ...) because I'm asking multiple questions and need to differenciate responses afterwards. I found out that there are callbacks but all that I found is for buttons and keyboards. Thanks!
Oh, I found the solution, you need to use scenes to achieve that
https://github.com/telegraf/telegraf/issues/705

is there a method to take screenshots of telegram chat?(want to make a telegram chat screenshot taker)

I am currently writing a bot to take screenshots of Telegram chat in Python.
I have written the options the bot is supposed to give to the user when it's started but I have no idea how to do this.
is it possible at all?
does telegram even let us do such a thing?
Based on official Documents of Telegram :
Bots are no different from human users that you meet in groups for example. They can see your public name, username, and profile pictures, and they can see messages you send to them, that's it.
and you can find more information from bots-privacy-mode
so basically Telegram doesn't let BOTs do such things as taking screenshots.

How to read a message from a bot via telegram API?

I have a room with a couple of bots, one of them needs to read all the messages on the room including other bot's messages.
Telegram API says bots can't see other bots message otherwise they might get caught in a "loop".
Since i really need to work around this i'm wondering if there is a known workaround?
There cannot be any workaround using the Bot APIs since the messages in getUpdates or webhook of the Bot will be from Users alone.
One workaround could be to use the telegram-cli and create a normal user as a Bot.

Resources