mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge pull request #167 from WeatherControl/dev-2.x
Fixed thumb for sendAudio
This commit is contained in:
commit
e77f5142b6
1 changed files with 3 additions and 1 deletions
|
|
@ -337,12 +337,14 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
|
|||
:rtype: :obj:`types.Message`
|
||||
"""
|
||||
reply_markup = prepare_arg(reply_markup)
|
||||
payload = generate_payload(**locals(), exclude=['audio'])
|
||||
payload = generate_payload(**locals(), exclude=['audio', 'thumb'])
|
||||
if self.parse_mode:
|
||||
payload.setdefault('parse_mode', self.parse_mode)
|
||||
|
||||
files = {}
|
||||
prepare_file(payload, files, 'audio', audio)
|
||||
prepare_attachment(payload, files, 'thumb', thumb)
|
||||
|
||||
|
||||
result = await self.request(api.Methods.SEND_AUDIO, payload, files)
|
||||
return types.Message(**result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue