mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-27 16:45:19 +00:00
Merge branch 'master' of https://github.com/pyrogram/pyrogram
This commit is contained in:
commit
a917596cb1
@ -42,9 +42,9 @@ class DeleteUserHistory(Scaffold):
|
||||
"""
|
||||
|
||||
r = await self.send(
|
||||
raw.functions.channels.DeleteUserHistory(
|
||||
raw.functions.channels.DeleteParticipantHistory(
|
||||
channel=await self.resolve_peer(chat_id),
|
||||
user_id=await self.resolve_peer(user_id)
|
||||
participant=await self.resolve_peer(user_id)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -37,6 +37,8 @@ class ChatAction:
|
||||
PLAYING = raw.types.SendMessageGamePlayAction
|
||||
CHOOSE_CONTACT = raw.types.SendMessageChooseContactAction
|
||||
SPEAKING = raw.types.SpeakingInGroupCallAction
|
||||
IMPORT_HISTORY = raw.types.SendMessageHistoryImportAction
|
||||
CHOOSE_STICKER = raw.types.SendMessageChooseStickerAction
|
||||
CANCEL = raw.types.SendMessageCancelAction
|
||||
|
||||
|
||||
@ -59,6 +61,7 @@ class SendChatAction(Scaffold):
|
||||
*"record_audio"* or *"upload_audio"* for audio files, *"upload_document"* for general files,
|
||||
*"find_location"* for location data, *"record_video_note"* or *"upload_video_note"* for video notes,
|
||||
*"choose_contact"* for contacts, *"playing"* for games, *"speaking"* for speaking in group calls or
|
||||
*"import_history"* for importing history, *"choose_sticker"* for stickers or
|
||||
*"cancel"* to cancel any chat action currently displayed.
|
||||
|
||||
Returns:
|
||||
@ -89,7 +92,7 @@ class SendChatAction(Scaffold):
|
||||
raise ValueError("Invalid chat action '{}'. Possible values are: {}".format(
|
||||
action, json.dumps(POSSIBLE_VALUES, indent=4))) from None
|
||||
|
||||
if "Upload" in action.__name__:
|
||||
if "Upload" in action.__name__ or "History" in action.__name__:
|
||||
action = action(progress=0)
|
||||
else:
|
||||
action = action()
|
||||
|
Loading…
Reference in New Issue
Block a user