from pyrogram import Client, raw, filters
import time
import threading
app = Client("my_account")
@app.on_message(filters.private)
def my_handler(client, message):
# x = raw.types.DraftMessage(message="text", date=int(time.time()))
message.reply_text("test")
def main():
time.sleep(3)
raw.types.DraftMessage(message="text", date=int(time.time()))
app.send_message(**************, "test")
d = threading.Thread(target=main, args=())
d.start()
app.run()