I've been using python-telegram-bot and I want my telegram bot to change supergroup's type from public into private, but I'm not able to find any api about this. Can anyone tell me is it possible to make a telegram bot to change supergroup's type?
Not at all.
This is not related to your programming language. This is because Telegram Bot API doesn't support your desired operation.
Nope, you can't
You only can subscribe to group change checking migrate_from_chat_id and migrate_to_chat_id in messages inside channel. Unfortunately you can't init such changes from bot, only observation possible and could be handled with fields mentioned above.
Related
I would like to listen to a Telegram Bot message -the Bot is sort of a weather Bot, and on every new message, I want to get that message- in a programmatic way.
I tried to use another Bot but Telegram doesn't allow interaction Bot-to-Bot!
I will appreciate any help.
Converting my comment to an answer as OP requested to eleborate it.
I would like to listen to a Telegram Bot message in a programmatic way
This is not possible using the Telegram Bot Api. As you already mentioned, Bot-to-Bot interaction is impossible at this point.
Of course, there are a few ways of achieving your desired outcome, I'll mention 2 of them:
Alter the bot you want listen to, let the Bot trigger a custom endpoint/script that will fit your needs
Using the official Telegram TDLib API, you can create your own Telegram Application, this way, you can programmicaly preform any action that a regular Client might do, this include 'listening' to messages from Bots and triggering any kind of webhook to fit your needs
I manage a channel that give links/information to users. Every time I update the content of the channel I have to update index of the channel in a post (message) manually.
Please teach me how to update a telegram post using telegram bot in python. Thanks a lots!
The Bot API provides the method editMessageText that you can use to edit the text of a message. Every library that provides a wrapper for the Bot API should also provide a wrapper for this method (in every language, not only in Python).
You need to get the message id and use https://core.telegram.org/bots/api#editmessagetext
I'm writing a bot that will send the same message for many people I've ever communicated in telegram. So I need to get all my old chat_id's.
All I found is just to store chat_id when I receive a new message as here Retrieve all chat ids using Telegram bot
But it doesn't fit me. If is it possible, please tell me, I'd really apreciate it!
It's not possible, as there is no such method listed in the Bot API Docs.
I have created some new telegram bots to test their functionality. I haven't used them before, but I cannot seem to get them to respond to any commands?
Has anyone come across this issue before?
You have created a telegram bot on telegram. However..
Did you set any webhooks for the bot?
You should set a webhook/polling and write a backend to make it response to your queries.
For reference you can start from here
https://core.telegram.org/bots/api
set the webhook for your bot.
Ex:
http://api.telegram.org/bot<TOKEN>/setWebhook?url=<ENDPOINT>
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.