@@ -37,6 +37,8 @@ class ChatAction:
3737 PLAYING = raw .types .SendMessageGamePlayAction
3838 CHOOSE_CONTACT = raw .types .SendMessageChooseContactAction
3939 SPEAKING = raw .types .SpeakingInGroupCallAction
40+ IMPORT_HISTORY = raw .types .SendMessageHistoryImportAction
41+ CHOOSE_STICKER = raw .types .SendMessageChooseStickerAction
4042 CANCEL = raw .types .SendMessageCancelAction
4143
4244
@@ -59,6 +61,7 @@ async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool:
5961 *"record_audio"* or *"upload_audio"* for audio files, *"upload_document"* for general files,
6062 *"find_location"* for location data, *"record_video_note"* or *"upload_video_note"* for video notes,
6163 *"choose_contact"* for contacts, *"playing"* for games, *"speaking"* for speaking in group calls or
64+ *"import_history"* for importing history, *"choose_sticker"* for stickers or
6265 *"cancel"* to cancel any chat action currently displayed.
6366
6467 Returns:
@@ -89,7 +92,7 @@ async def send_chat_action(self, chat_id: Union[int, str], action: str) -> bool:
8992 raise ValueError ("Invalid chat action '{}'. Possible values are: {}" .format (
9093 action , json .dumps (POSSIBLE_VALUES , indent = 4 ))) from None
9194
92- if "Upload" in action .__name__ :
95+ if "Upload" in action .__name__ or "History" in action . __name__ :
9396 action = action (progress = 0 )
9497 else :
9598 action = action ()
0 commit comments