We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31a73ff commit 2d41d2aCopy full SHA for 2d41d2a
1 file changed
telebot/types.py
@@ -1618,6 +1618,14 @@ def user_shared(self):
1618
logger.warning('The parameter "user_shared" is deprecated, use "users_shared" instead')
1619
return self.users_shared
1620
1621
+ @property
1622
+ def any_text(self):
1623
+ return self.caption if (self.caption is not None) else self.text
1624
+
1625
1626
+ def any_entities(self):
1627
+ return self.caption_entities if (self.caption_entities is not None) else self.entities
1628
1629
1630
# noinspection PyShadowingBuiltins
1631
class MessageEntity(Dictionaryable, JsonSerializable, JsonDeserializable):
0 commit comments