mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fixed: Cannot send playlist of audio files (#465)
* fixed: Cannot send playlist of audio files #464 * #463 removed document and audio from check * #463 style fix
This commit is contained in:
parent
ee3b0954a3
commit
ae7b250e33
1 changed files with 6 additions and 6 deletions
|
|
@ -270,10 +270,10 @@ class MediaGroup(base.TelegramObject):
|
|||
media = InputMediaPhoto(**media)
|
||||
elif media_type == 'video':
|
||||
media = InputMediaVideo(**media)
|
||||
# elif media_type == 'document':
|
||||
# media = InputMediaDocument(**media)
|
||||
# elif media_type == 'audio':
|
||||
# media = InputMediaAudio(**media)
|
||||
elif media_type == 'document':
|
||||
media = InputMediaDocument(**media)
|
||||
elif media_type == 'audio':
|
||||
media = InputMediaAudio(**media)
|
||||
# elif media_type == 'animation':
|
||||
# media = InputMediaAnimation(**media)
|
||||
else:
|
||||
|
|
@ -282,8 +282,8 @@ class MediaGroup(base.TelegramObject):
|
|||
elif not isinstance(media, InputMedia):
|
||||
raise TypeError(f"Media must be an instance of InputMedia or dict, not {type(media).__name__}")
|
||||
|
||||
elif media.type in ('document', 'audio', 'animation'):
|
||||
raise ValueError(f"This type of media is not supported by media groups!")
|
||||
elif media.type == 'animation':
|
||||
raise ValueError("This type of media is not supported by media groups!")
|
||||
|
||||
self.media.append(media)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue