Skip to content

Commit

Permalink
any_xxx typehints added
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Aug 17, 2024
1 parent 2d41d2a commit 8dcfdc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1619,11 +1619,11 @@ def user_shared(self):
return self.users_shared

@property
def any_text(self):
def any_text(self) -> Optional[str]:
return self.caption if (self.caption is not None) else self.text

@property
def any_entities(self):
def any_entities(self) -> Optional[List[MessageEntity]]:
return self.caption_entities if (self.caption_entities is not None) else self.entities


Expand Down

0 comments on commit 8dcfdc5

Please sign in to comment.