Код: Выделить всё
client.start()
chat = input("@user: ")
id = client.get_chat_history_count(chat_id = chat)
randid = random.ranint(1, id)
message = client.copy_message(chat_id = chat, from_chat_id = chat, message_id = randid)
tmessage = message["text"]
send = client.send_message(chat_id = chat, text = tmessage)
client.stop()
Код: Выделить всё
if message["Message"] is None:
continue
Код: Выделить всё
if message.Message is None
continue
Подробнее здесь: https://stackoverflow.com/questions/789 ... d-pyrogram