Fixed send_copy: added caption to send_voice (#722)

This commit is contained in:
Gabben 2021-10-09 20:22:06 +03:00 committed by GitHub
parent 100848b889
commit a57f9cfc70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2899,7 +2899,9 @@ class Message(base.TelegramObject):
video_note=self.video_note.file_id, **kwargs
)
elif self.voice:
return await self.bot.send_voice(voice=self.voice.file_id, **kwargs)
return await self.bot.send_voice(
voice=self.voice.file_id, caption=text, **kwargs
)
elif self.contact:
kwargs.pop("parse_mode")
return await self.bot.send_contact(