mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Implement Sticker Choosing Action (#3144)
This commit is contained in:
parent
2182e7f6f1
commit
391fbab674
|
@ -22,6 +22,7 @@ class _ChatAction:
|
|||
'contact': types.SendMessageChooseContactAction(),
|
||||
'game': types.SendMessageGamePlayAction(),
|
||||
'location': types.SendMessageGeoLocationAction(),
|
||||
'sticker': types.SendMessageChooseStickerAction(),
|
||||
|
||||
'record-audio': types.SendMessageRecordAudioAction(),
|
||||
'record-voice': types.SendMessageRecordAudioAction(), # alias
|
||||
|
@ -773,6 +774,7 @@ class ChatMethods:
|
|||
* ``'contact'``: choosing a contact.
|
||||
* ``'game'``: playing a game.
|
||||
* ``'location'``: choosing a geo location.
|
||||
* ``'sticker'``: choosing a sticker.
|
||||
* ``'record-audio'``: recording a voice note.
|
||||
You may use ``'record-voice'`` as alias.
|
||||
* ``'record-round'``: recording a round video.
|
||||
|
|
|
@ -136,6 +136,7 @@ class UserUpdate(EventBuilder):
|
|||
"""
|
||||
return isinstance(self.action, (
|
||||
types.SendMessageChooseContactAction,
|
||||
types.SendMessageChooseStickerAction,
|
||||
types.SendMessageUploadAudioAction,
|
||||
types.SendMessageUploadDocumentAction,
|
||||
types.SendMessageUploadPhotoAction,
|
||||
|
@ -228,6 +229,14 @@ class UserUpdate(EventBuilder):
|
|||
"""
|
||||
return isinstance(self.action, types.SendMessageUploadDocumentAction)
|
||||
|
||||
@property
|
||||
@_requires_action
|
||||
def sticker(self):
|
||||
"""
|
||||
`True` if what's being uploaded is a sticker.
|
||||
"""
|
||||
return isinstance(self.action, types.SendMessageChooseStickerAction)
|
||||
|
||||
@property
|
||||
@_requires_action
|
||||
def photo(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user