Comments (3)
I think I found what the problem is, the Saved Messages Chat is not seen by Telegram as a Chat but as a User, so when we execute peerChannel = PeerChannel(channel_id) we get an error.
I fixed my problem by removing that line and replacing by peerChannel = channel_id, filtering the event by using client.on(events.NewMessage(chats=channel_id) instead of the if inside and removing the if statement comparing if the event if from the user selected chat. if event.to_id != peerChannel:
so the code ended being
...
queue = asyncio.Queue()
#peerChannel = PeerChannel(channel_id)
peerChannel = channel_id
@client.on(events.NewMessage(chats=channel_id))
async def handler(event):
#if event.to_id != peerChannel:
# return
print(event)
try:
...
Now the script allow me to use the saved messages as my "media storage", the detail to have into account is if you want to use a different chat then the Saved Messages you should remove the negative sign from the Chat ID you want to use.
I don't know if I broke something else, I'm testing, so far so good
from telegram-download-daemon.
I would need to know how yo use this script. Are you using your own Saved Message for downloads or are you forwarding files from your Saved Message chat to another one?
How did you get the chat_id of "Saved Messages"?
from telegram-download-daemon.
Hi,
For the Chat ID I used Telegram Web, and used the last part of the URL for example
https://web.telegram.org/z/#123456789, so the chat ID would be 123456789, one difference I found is that this Chat ID is a positive number while If i look into a channel I created the number is negative.
I forward Media from others chats to my Saved Message folder
from telegram-download-daemon.
Related Issues (20)
- proxy unavailable HOT 2
- Error download big files HOT 1
- Please HELP! Error while installing "cffi" HOT 1
- Feature Request: automatically download to directory named after Channel HOT 1
- Error: [Errno 2] No such file or directory - after download finish HOT 1
- Need help with the interactig part of docker compose HOT 13
- Request was unsuccessful 6 time(s) HOT 1
- command to check the queue HOT 1
- Option to run this as a service? HOT 1
- I get the this Error: [Errno 17] File exists: '/downloads' HOT 3
- Problem with authentication running docker in NAS HOT 10
- Error when using the "workers" parameter with a large download list HOT 1
- telethon.network.mtprotostate:Server sent a very new message with ID xyz HOT 3
- a better progress bar on telegram
- download only file with .pdf extension
- RPCError in FileRequest HOT 13
- Docker compose first run failed HOT 4
- Do not use api_id 611335, or any official telegram client api id that already causing my account ban now. HOT 1
- Docker: Unable to persist session to file HOT 1
- How do I configure destination path? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-download-daemon.