When you have a large number of unread messages to catch up with, you tend to search for the dialog with the smallest unread count and finish those off first before moving on to the ones with larger unread messages.
Alas, Telegram does not provide an option to sort your dialogs by unread count. This script sorts your unreads by count and prints them out along with the number of unread messages. You can then pick those dialogs and start catching up with your unreads. This helps in finishing the smaller dialogs faster giving you some kind of satisfaction and motivation to keep going.
This script requires telethon ( source repository on GitHub ) to run.
Run pip3 install -r requirements.txt
from the project's root directory.
And obviously, since this is a python script, it goes without saying that you would also need python3 installed and available in your PATH.
- To run the script, you need to obtain API credentials for your Telegram account. You can also access your existing credentials
- Add the credentials obtained in Step 1 to
config
The script is interactive by default. It will first fetch the different folders on the account and print them out so that the user can choose which folder to sort. After the user inputs a choice, the dialogs in the folder are then fetched, sorted and printed.
The script can also be supplied with an integer argument that represents the folder_id of the folder on the account.