MCPcopy Create free account
hub / github.com/TechifyBots/File-Stream-Bot / get_file_properties

Method get_file_properties

biisal/utils/custom_dl.py:36–45  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 1

media_streamerFunction · 0.95

Calls 1

Tested by

no test coverage detected