Skip to content

Feature Request: File Interface #339

Description

@calebpower

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions