From ddf5a66cb7ae7ac878f6b40ebc3adf8202c47cb5 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Mon, 26 Apr 2021 18:34:39 +0300 Subject: [PATCH] feat: add `record_voice` and `upload_voice` to `ChatActions` --- aiogram/types/chat.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 3b0a7b9d..5b3b315a 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -732,6 +732,8 @@ class ChatActions(helper.Helper): UPLOAD_VIDEO: str = helper.Item() # upload_video RECORD_AUDIO: str = helper.Item() # record_audio UPLOAD_AUDIO: str = helper.Item() # upload_audio + RECORD_VOICE: str = helper.Item() # record_voice + UPLOAD_VOICE: str = helper.Item() # upload_voice UPLOAD_DOCUMENT: str = helper.Item() # upload_document FIND_LOCATION: str = helper.Item() # find_location RECORD_VIDEO_NOTE: str = helper.Item() # record_video_note @@ -817,6 +819,26 @@ class ChatActions(helper.Helper): """ await cls._do(cls.UPLOAD_AUDIO, sleep) + @classmethod + async def record_voice(cls, sleep=None): + """ + Do record voice + + :param sleep: sleep timeout + :return: + """ + await cls._do(cls.RECORD_VOICE, sleep) + + @classmethod + async def upload_voice(cls, sleep=None): + """ + Do upload voice + + :param sleep: sleep timeout + :return: + """ + await cls._do(cls.UPLOAD_VOICE, sleep) + @classmethod async def upload_document(cls, sleep=None): """