Closed Vo0oX closed 2 years ago
you can probably use https://gram.js.org/beta/classes/TelegramClient.html#forwardMessages
await client.forwardMessages(id_channel_toPeer , {messages:[3594049],fromPeer:_id_channel_fromPeer });
you can probably use https://gram.js.org/beta/classes/TelegramClient.html#forwardMessages
await client.forwardMessages(id_channel_toPeer , {messages:[3594049],fromPeer:_id_channel_fromPeer });
Thanks
media -
photo: {
CONSTRUCTOR_ID: 4212750949,
SUBCLASS_OF_ID: 3581324060,
className: 'Photo',
classType: 'constructor',
flags: 0,
hasStickers: false,
id: Integer { value: 6253484336326226418n },
accessHash: Integer { value: 3887061461413119359n },
fileReference: <Buffer 02 69 c2 3e 3c 00 00 00 38 62 d9 50 84 18 26 cf b3 5c 91 79 9b 5d d5 80 20 d7 ba 5d ff>,
date: 1658408930,
sizes: [
{
CONSTRUCTOR_ID: 3769678894,
SUBCLASS_OF_ID: 399256025,
className: 'PhotoStrippedSize',
classType: 'constructor',
type: 'i',
bytes: <Buffer 01 27 28 d8 a8 e7 62 90 bb 2f de 0a 48 a5 2e 17 ad 45 29 92 45 74 50 36 91 8c f7 a0 69 5d 8f 82 41 24 4a 43 12 71 c9 3d 6a 5a a5 66 1e 3d e9 21 3b 57 ... 184 more bytes>
},
{
CONSTRUCTOR_ID: 1976012384,
SUBCLASS_OF_ID: 399256025,
className: 'PhotoSize',
classType: 'constructor',
type: 'm',
w: 320,
h: 313,
size: 17712
},
{
CONSTRUCTOR_ID: 1976012384,
SUBCLASS_OF_ID: 399256025,
className: 'PhotoSize',
classType: 'constructor',
type: 'x',
w: 800,
h: 782,
size: 55948
},
{
CONSTRUCTOR_ID: 4198431637,
SUBCLASS_OF_ID: 399256025,
className: 'PhotoSizeProgressive',
classType: 'constructor',
type: 'y',
w: 1038,
h: 1014,
sizes: [Array]
}
],
videoSizes: null,
dcId: 5
}
another question. If I'm in another group, I get text and a picture. How can I get it from this data and send it to my group?
or you need to download and send already
await client.sendFile('-1001612019147', {file:__dirname +'/upload/me.png', caption:"It's me!"})
you don't need to download it. you can just pass the message to client.sendMessage
I managed to fully connect.
thanks to the bottom function i can read the incoming data
but I still don't understand how I can figure out how to forward messages from a group.
this feature doesn't work for me.
please help me figure it out