aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.34k stars 797 forks source link

Feature Request - Ability To Forward Partial Messages From A Channel #53

Closed tissole closed 3 years ago

tissole commented 3 years ago

Hello! The current behavior of the script is forwarding from the beginning to the end of posts. I want to copy posts between a certain range, for example from post 1000 to post 1500. Can be implemented?

aahnik commented 3 years ago

you can set the offset to define the starting point. The endpoint cannot yet be defined.

The offset is the id of the message as in Telegram's database.

tissole commented 3 years ago

"The endpoint cannot yet be defined." What is that meaning? It is because of Telegram?

aahnik commented 3 years ago

"The endpoint cannot yet be defined." What is that meaning? It is because of Telegram?

I cant say without context. Please give more details, and where you encountered the error.

tissole commented 3 years ago

No, is not an error. I want to forward only from post id 1000 to post id 1500 from a channel.

aahnik commented 3 years ago

Where did you get that message? While setting offset? That means that message-id does not exist yet.

tissole commented 3 years ago

No, not an error is a feature. Currently

[Books]
from = -aaaaaaaaaaa
to = -bbbbbbbbbbb
offset = 1000

The script forwards from the post id 1000 to the end of posts in the source channel. I want to copy from post id 1000 to post id 1500, not to the end of posts, but now it is not possible.

aahnik commented 3 years ago

sorry! in a hurry, i was misunderstanding your question.

Now, I got it.

endpoint means = where to stop

the feature is not there, because it is not yet implemented.

It is because of Telegram?

No, it is just not implemented yet by me.

tissole commented 3 years ago

Ok, thanks for the clarification.

aahnik commented 3 years ago

Currently, the offset is there. In the next release I will add another attribute end . The value of end should be the message id of the last message.

tgcf would not copy messages greater than that message id.

The offset and end are applicable when tgcf is run in past mode.

tissole commented 3 years ago

Good, thank you!

aahnik commented 3 years ago
forwards:
  - source: -1001412118156
    dest: [-1001461332656,-1001457230530]
    offset: 100 # id of the last forwarded message
    # forwarding will start from msg id offset + 1
    end: 5000 # msg id for ending