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

Feature Request: File Interface #339

Open
calebpower opened this issue Aug 18, 2023 · 0 comments
Open

Feature Request: File Interface #339

calebpower opened this issue Aug 18, 2023 · 0 comments

Comments

@calebpower
Copy link

This is a feature request (that I might submit a PR for if I ever find the time). It's also possible that perhaps I'm simply missing something in the library, so please call me out if I have.

It would be very useful to have the ability to iterate through the various file variants that can be sent. For example, classes Audio, Document, Video, VideoNote, Voice, Photo, and perhaps others that I've missed, all have fileID() methods that can be used to download the data. It would be nice for those classes to implement some interface (e.g. Downloadable) and for the Message class to have some method getDownloads() so that one can quickly iterate through those files. As it is right now, spaghetti code seems to be required where one checks for the presence of each individual type before downloading it.

Use cases might be for malware scanners, archivers, other scanners, etc.

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

1 participant