diff --git a/Forwarding-messages.md b/Forwarding-messages.md index a5ffa06..12c5b11 100644 --- a/Forwarding-messages.md +++ b/Forwarding-messages.md @@ -1,18 +1,19 @@ -For some reason, [`ForwardMessageRequest`](https://lonamiwebs.github.io/Telethon/methods/messages/forward_message.html) (note it's *Message*, singular) does **not** seem to work. +Note that [`ForwardMessageRequest`](https://lonamiwebs.github.io/Telethon/methods/messages/forward_message.html) (note it's *Message*, singular) will **not** work if channels are involved. This is because channel (and megagroups) IDs are not unique, so you also need to know who the sender is (a parameter this request doesn't have). -You should use [`ForwardMessagesRequest`](https://lonamiwebs.github.io/Telethon/methods/messages/forward_messages.html) (note it's _Message**s**_, plural) as follows: +Either way, you are encouraged to use [`ForwardMessagesRequest`](https://lonamiwebs.github.io/Telethon/methods/messages/forward_messages.html) (note it's _Message**s**_, plural) **always**, since it is more powerful, as follows: ```python from telethon.tl.functions.messages import ForwardMessagesRequest +# note the s ^ messages = foo() # Logic to retrieve a few messages. from_entity = bar() # Who has the original messages. to_entity = baz() # Who you want to forward them to. client(ForwardMessagesRequest( - from_peer=from_entity, - id=[msg.id for msg in messages], - to_peer=to_entity + from_peer=from_entity, # who sent these messages? + id=[msg.id for msg in messages], # which are the messages? + to_peer=to_entity # who are we forwarding them to? )) ```