Skip to content

Instantly share code, notes, and snippets.

@RedL0tus RedL0tus/
Last active Apr 10, 2018

What would you like to do?
Mark recent dialogs as read in telegram by using telegram-cli and pytg
#!/usr/bin/env python3
#-*- encoding: utf-8 -*-
# please install pytg and telegram-cli before running this script
# pytg:
# telegram-cli:
from pytg import Telegram
def main():
tg = Telegram(
sender = tg.sender
count = 0
for i in sender.dialog_list():
count += 1
print(">>> Processing " + i.print_name)
print(">>> Total " + str(count) + " dialogs processed.")
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.