Skip to content

Instantly share code, notes, and snippets.

View ermkmandawar's full-sized avatar
🏠
Working from home

M.K. Mandawar ermkmandawar

🏠
Working from home
View GitHub Profile
@ermkmandawar
ermkmandawar / ott.py
Last active May 8, 2024 17:30
ott.py
from datetime import datetime, timedelta
from sys import argv, exit
from telethon import TelegramClient, events, connection
from telethon.tl.types import UserStatusRecently, UserStatusEmpty, UserStatusOnline, UserStatusOffline, PeerUser, PeerChat, PeerChannel
from time import mktime, sleep
import telethon.sync
from threading import Thread
import collections
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'