Fixed precision number
📁 Advanced Python Topics
Need to output a number a of type float to the screen with a precision of at least n decimal places.
Python 3, without using libraries.
This method returns only new messages. If the bot has already reacted to some messages sent to it, it has already received them (most likely using the same method) and they are marked by the Telegram server as received. Accordingly, they will not be returned on each new request, otherwise you would receive the entire message history since the bot was created every time. In this case, you have two options:
- Keep a log of messages received by the bot and use it at your discretion.
- Experiment with the
offsetparameter of thegetUpdatesmethod. More details here:
For example: https://api.telegram.org/botXXXXXXXXXX/getUpdates?offset=-10
Log in to leave an answer