Closed Roy5000 closed 5 years ago
You can use this to get messages you know the ids
var messages = await client('channels.getMessages', {
channel: {
_:"inputPeerChannel",
channel_id:'*******',
access_hash: '*******'
},
id: [1, 2, 3, 4, 25] // Example message_id
});
console.log(messages);
This is also useful for
var messages = await client('messages.getHistory', {
peer: {
_:"inputPeerChannel",
channel_id:'*****',
access_hash: '*******'
}
});
console.log(messages);
I try to get the text of messages in a public channel and tried several constructor but without success. The constructors I tried do not return the message text. Which constructor can I use to retrieve the message text?
Attempt 1: Constructor readMessageContents.
(for parameter "id" I added [2] but i'm not sure how this is used by the contructor.)
result is error message:
Attempt 2: constructor channels.getChannels
return below channel details without message text:
Attempt 3: constructor channels.getFullChannel
returns below channel details, but no message text: