Telegram: How to add another(existing) bot to bot_father? - telegram

How can I add another existing bot to my BothFather in telegram?
I have my own bot and I can see it in BotFather and now I am asked to manage another bot (which I have its security key).
But I could not see this bot in my BotFather(obviously, because I did not create it) and I could not find any way to add this second bot into my BotFather in order to change its info or default commands list.

If I understand correctly, you have a bot that you created yourself with #BotFather and you can manage its commands, info etc. by talking to BotFather.
Then you have been asked to manage another bot created by someone else and you have been given its token.
Let me tell you that you cannot change the info of the Bot created by someone else. i.e. you don't have the ownership of the Bot.
Bot Ownership transfer is a feature that Telegram Support said will consider in future.
As far as making the bot work, by using the API Token you can go through their Bot API Documentation.
[EDIT]
With Bot API 5.0, it's now possible to Transfer the bot ownership.

Related

Is it possible to send message from my account with interval in Telegram?

I need to send message from my own account with my nickname and profile (not from bot account) to any selected contact or group. How can I do that? I found bots with similar behaviour but messages are sent from bot account not from my profile which is what I need.
what you're looking for is a so-called "userbot" or "selfbot", i.e. a bot that works with the Telegram API in contrast to the Telegram Bot API. Searching for Telegram userbot library <your preferred programming language> should probably get you started.

Can another telegram user make me access his bot?

My friend has a tranding bot made with BotFather.
Is there a way to make the bot shared betweeen our account in a way we can use it together?
Bot usernames are unique to each Telegram account and only that account is able to change the settings of the bot.
But you can make use of a bot through its API_TOKEN which you can get from botfather.
It looks like this:
300123900:BARsAbMYBJv5wFhzNJ-Gbx678qpln7IgvzI
If you share the token with anyone, they can use your bot. They will receive an error if they try to use it at the same time (calling getUpdates method from more than one instance would reject the caller except for the first one).
If by sharing you meant using the bot (not developing it), you can't do that unless the bot's developer designs it in a way that multiple Telegram accounts messaging the bot are considered one account.

how to read/receive telegram channel messages in my telegram bot?

i'm trying to create a bot which can read/receive all messages in a specific channel and send them to me .
my problem here is that i can't find a way to access those messages in my bot
important thing is:
i'm not admin or creator of that channel
i don't want to ask the creator to add my bot as administrator
i've searched in google but i wasn't able to find a solution
and i'm also sure that it is possible to do it, because there are already some junction bots with exact same performance .
any references or suggestions are appreciated .
As already pointed out in the Telegram group of python-telegram-bot, bots can't receive messages from channels where they are not an admin. If you want something like this, you'll have to use a user bot, e.g. a program that controls your private Telegram account (in contrast to controlling a bot account). See here for some info on user bots.
Note that also the provider that you linked seems to be using userbots behind the scenes. More precisely, the docs on the so called "DirectConnection" state that you need to enter a phone number (associated to a telegram account) and then "Follow the instructions" which probably just means to enter the verification code that Telegram sends you. Phone number + verification code is exactly what is needed to control your private Telegram account.
Disclaimer: I'm currently the maintainer of python-telegram-bot.

How can I programatically get a Telegram Bot's info

As per the Telegram Bot API's documentation I see it is possible to retrieve a bot's name (using getMe).
It is also possible to retrieve a botpic of a specific bot (using getUserProfilePhotos).
I've read Telegram's documentation again and again and I cannot find a way to obtain either of a Telegram bot's Description, About or Commands.
Also I cannot find any way to check what a specific bot's allow groups, group privacy and domain are set to.
Are Telegram Bots in some alpha/experimental state ?
It's a powerful idea but I see they lack most of the features you (as a developer) would expect them to have.
I see there are a lot of random features instead.
How could I retrieve the upper properties (Description, About, Commands) for a specific bot using the Telegram Bot API ?
How could I retrieve a specific bot owner account's info, phone number Telegram Bot API ?
P.S: I have all the tokens of the bots I am about to retrieve the upper information for.
You can't with the bots API but it will be possible with userbot (a bot running as regular telegram account) using client API.
Obtaining number and information of the bot owner would be leaking of private data, privacy...

Telegram bot doesn't respond in group chats

I made a simple chatbot using Microsoft Bot Framework and integrated it with Telegram.
He works fine whenever I message him privately but whenever I put him in a group with my friends, he doesn't reply, even when I mention him.
/setjoingroups is enabled, and so is /setprivacy.
First make sure it is not caused by Microsoft Bot itself. Then for all normal bots --
Always add a Telegram bot to a group via the bot's info window, instead of inviting the bot to a group via the group's info window.
It's a clear trap for beginners. I'm surprised that Telegram didn't note this in their documentation.
When you configured your bot on Telegram, did you make it an inline bot? It's been my experience that inline bots cannot participate in group chats, but can message privately. If not, please open a GitHub issue here and we'll follow up there.
Beyond all other suggestions like turning off inline functions, setting privacy to disabled and allowing to participate in groups, I also made the bot an admin of my group. And now it processes all messages. That's what's worked for me.
I had this same problem, and I found that I just needed to add the bot as an 'admin' to the chat instead of just a normal member. The telegram bot must have admin privileges to access every message/image that the users of the group-chat send.

Resources