INNER CODE UNIT · Python

get_thumbnail

TEAM-PYRO-BOTZ/PYRO-RENAME-BOT · helper/database.py:43

    async def get_thumbnail(self, id):
        user = await self.col.find_one({'_id': int(id)})
        return user.get('file_id', None)

    async def set_caption(self, id, caption):
        await self.col.update_one({'_id': int(id)}, {'$set': {'caption': caption}})

    async def get_caption(self, id):
        user = await self.col.find_one({'_id': int(id)})
        return user.get('caption', None)


db = Database(Config.DB_URL, Config.DB_NAME)




View source record →

📰 Research Paper
Loading…
⏳ Fetching content…