Skip to content

Commit

Permalink
Add User.photo bound method
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Sep 20, 2024
1 parent 62f95e4 commit 0dcdbc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tgram/bound/user.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import tgram

from tgram.utils import Mention
from tgram.utils import Mention, async_property


class UserB:
@async_property
async def photo(self: "tgram.types.User") -> "tgram.types.PhotoSize":
return (await self._me.get_user_profile_photos(self.id, limit=1)).photos[-1][-1]

@property
def mention(
self: "tgram.types.User",
Expand Down

0 comments on commit 0dcdbc6

Please sign in to comment.