Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward to topic #87

Closed
aivarasx987 opened this issue Nov 24, 2023 · 5 comments
Closed

Forward to topic #87

aivarasx987 opened this issue Nov 24, 2023 · 5 comments

Comments

@aivarasx987
Copy link

Is it possible to forward a message to channel topic with this bot? Usual channel ID is: -100?????, channel topic ID is: -100?????_111111

@aivarasx987
Copy link
Author

Never mind, found a workaround for my case.

@khoben
Copy link
Owner

khoben commented Jan 5, 2024

Can you share your solution?

@aivarasx987
Copy link
Author

I don't really remember why I did it this way, but I don't forward straight to topic, I copy the message, download any media if message has it and then I send it as a user(I think I did this because of media problems).

You just send text like this:
await client.send_message(destination_chat, text, reply_to=topic_id)

@khoben
Copy link
Owner

khoben commented Jan 5, 2024

I don't really remember why I did it this way, but I don't forward straight to topic, I copy the message, download any media if message has it and then I send it as a user(I think I did this because of media problems).

You just send text like this:
await client.send_message(destination_chat, text, reply_to=topic_id)

Thanks for your reply. For such cases I'm going to make way to set parameters for .send_message/.edit_message through filters.
Most likely forwarding was prohibited and sending media via ID did not work, only downloading and re-uploading the media will help.

@aivarasx987
Copy link
Author

I don't really remember why I did it this way, but I don't forward straight to topic, I copy the message, download any media if message has it and then I send it as a user(I think I did this because of media problems).
You just send text like this:
await client.send_message(destination_chat, text, reply_to=topic_id)

Thanks for your reply. For such cases I'm going to make way to set parameters for .send_message/.edit_message through filters. Most likely forwarding was prohibited and sending media via ID did not work, only downloading and re-uploading the media will help.

Yeah, forwarding messages to topic with media(photos, videos, mix of them) didn't work for me, because of that I went for user(telethon) copying and sending message approach.

khoben added a commit that referenced this issue Jan 23, 2024
Resolves #87, resolves #95
khoben added a commit that referenced this issue Jan 23, 2024
Resolves #87, resolves #95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants