Closed abbb closed 1 year ago
Bots can't write to other bots and they can't join groups by themselves, hence they definitely can't use shareChatWithBot
.
Look at td_api.tl (master), line 1576:
//@description A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request
...
keyboardButtonTypeRequestChat ...
Why is it phrased that way?
PS: Overall solved. Setting parameters for keyboardButtonTypeRequestChat turned out to be quite a challenge, in case of omission of parameters user_administrator_rights and bot_administrator_rights the button appears, allows to select a chat, after selection even a notification about successful addition appears, but the actual addition does not happen. Taking into account this fact, as well as the text from the comment, it seems that it is necessary to run the shareChatWithBot method.
Why is it phrased that way?
Because TDLib documentation is for app developers and regular users. When a user receives the button, it can use the method shareChatWithBot
to process the button. Bot API documentation can be found at https://core.telegram.org/bots/api.
De
I run it with all necessary parameters from td_api.tl after getting messageChatShared, but I get Error: (400, 'The method is not available to bots')
This is the method for adding a bot to groups, how can it not be available to bots?