-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose MTProto Methods, which are used by Bot API anyway #62
Comments
Exposing From the other side, bots receive replied and other context messages directly in updates. There is no place in Bot API where bot receives a message identifier without the message except respose of the method |
Thanks for the fast reply!
Just to clarify: Your point is that using
True. However, there certainly are use cases, where you would only need to call Also, there is currently no proper way to know if a message was already deleted or not: You can try-except |
Yes. Also, not only
Bots receive all message edits, so it shouldn't need to call
True, but check of message existence by constant regetting of all the messages wouldn't work anyway. Such approach needs enormous number of requests and will immediately lead to exceeding of flood limits.
There are no reasons to know that except some statistics. It doesn't matter how often bot checks whether user blocked it, it must handle 403th error, because user can block the bot in-between the check and a request. Bots just need to properly handle 403th error for send message requests.
No, this information isn't available. Moreover, only bots receive an error and non-bots has no way to know that the other user blocked them. |
All right, thanks for the detailed replies. From my point of view, Apart from the two examples Anyway, I'm happy to have the already great Bot API and the updates it already gets. It just seemed to me that it was worth asking, if double checking if some more helpful info could be exposed is an option :) Feel free to close, if you disagree on that. |
I suggest method |
@Muaath5 Bots should use |
@Muaath5 |
I'd like to add that bots are not always added on chat creation and thus can't know about users that are already in the chat, so calling such a method once per chat sounds like a reasonable use case to me. (The |
@Bibo-Joshi Bots aren't supposed to have access to past events. For example, this is never needed to handle |
IMHO there is a difference between "past event" and "current state". E.g. |
Add knob to control the file expiration timeout.
Hi there!
This issue is basically a follow up on a few comments from #1 (here, here, here), but as that's closed and discusses a lot of other topics, I'm opening a new issue.
What I understand from above comments: MTProto exposes some methods to Bots, while not directly exposing them through the Bot API, because the Bot API uses them internally. Not all of what MTProto provides via those methods is useful for bots.
My question would be, if it would be possible to fully expose those methods through the Bot API or at least reevaluate which of those can be useful for bots. Specifically, in the usergroup of python-telegram-bot, we get many questions on how to access a message by chat- and message_id. This is currently not possible through the Bot API, while
getMessages
is accessible by bots.If I'm getting this all wrong, please correct me. Otherwise I'd be happy for a short response or - ideally - a future extension of Bot API.
Cheers!
A happy Bot API user :)
The text was updated successfully, but these errors were encountered: