# After running the script in logging in to your account, send "forward_unseen:mister_x:10" to your saved messages, # the bot will then forward 10 last messages of the first user with name mister_x to your saved messages. # This way you can check what people have sent you without them knowing you did. from telethon import TelegramClient, events, sync from telethon.tl.types import PeerUser api_id = # Your Telegram API id here api_hash = # Your Telegram API hash here client = TelegramClient("Session_Name", api_id, api_hash) client.start() @client.on(events.NewMessage) async def my_event_handler(event): if "forward_unseen:" in event.raw_text: command = event.raw_text.split(":") name = command[1] count = command[2] for dialog in await client.iter_dialogs(): if dialog.title == name: user = client.get_entity(PeerUser(dialog.id)) i = 1 for chat in client.iter_messages(user): await client.forward_messages(client.get_me(), chat, user) if i >= count: break i += 1 break client.run_until_disconnected()