Returns the properties of a media of a specific message in a FIleId class. if the properties are cached, then it'll return the cached results. or it'll generate the properties from the Message ID and cache them.
(self, id: int)
| 34 | asyncio.create_task(self.clean_cache()) |
| 35 | |
| 36 | async def get_file_properties(self, id: int) -> FileId: |
| 37 | """ |
| 38 | Returns the properties of a media of a specific message in a FIleId class. |
| 39 | if the properties are cached, then it'll return the cached results. |
| 40 | or it'll generate the properties from the Message ID and cache them. |
| 41 | """ |
| 42 | if id not in self.cached_file_ids: |
| 43 | await self.generate_file_properties(id) |
| 44 | logging.debug(f"Cached file properties for message with ID {id}") |
| 45 | return self.cached_file_ids[id] |
| 46 | |
| 47 | async def generate_file_properties(self, id: int) -> FileId: |
| 48 | """ |
no test coverage detected