I am using Telethon and Python 3.6xx
Been able to retreive message from groups, no problem but when it comes to channels I am stuck.
dialogs = client(get_dialogs)for chat in dialogs.chats: getmessage = client.get_messages(chat.id, limit=400) for message in getmessage: print(message.message)
I've searched the telethon documentation but most answers were in response to the old get_message_history
.
When I'm trying with the following chat.id = 1097988869
(news.bitcoin.com) I'm getting an error below (for groups the chat.id
works fine):
PeerIdInvalidError: An invalid Peer was used. Make sure to pass the right peer type