diff --git a/pyrogram/methods/messages/get_media_group.py b/pyrogram/methods/messages/get_media_group.py index d43fb328..cf01a8ed 100644 --- a/pyrogram/methods/messages/get_media_group.py +++ b/pyrogram/methods/messages/get_media_group.py @@ -20,7 +20,7 @@ import logging from typing import Union, List from pyrogram.scaffold import Scaffold -from pyrogram.types import list +from pyrogram import types log = logging.getLogger(__name__) @@ -56,4 +56,4 @@ class GetMediaGroup(Scaffold): if media_group_id is None: raise ValueError("The message doesn't belong to a media group") - return list.List(msg for msg in messages if msg.media_group_id == media_group_id) + return types.List(msg for msg in messages if msg.media_group_id == media_group_id) diff --git a/pyrogram/types/messages_and_media/message_entity.py b/pyrogram/types/messages_and_media/message_entity.py index 2c7fde7f..a0fc86a9 100644 --- a/pyrogram/types/messages_and_media/message_entity.py +++ b/pyrogram/types/messages_and_media/message_entity.py @@ -77,13 +77,23 @@ class MessageEntity(Object): Parameters: type (``str``): - Type of the entity. - Can be "mention" (``@username``), "hashtag" (``#hashtag``), "cashtag" (``$PYRO``), - "bot_command" (``/start@pyrogrambot``), "url" (``https://pyrogram.org``), - "email" (``do-not-reply@pyrogram.org``), "phone_number" (``+1-420-069-1337``), "bold" (**bold text**), - "italic" (*italic text*), "underline" (underlined text), "strikethrough" (strikethrough text), - "code" (monowidth string), "pre" (monowidth block), "text_link" (for clickable text URLs), - "text_mention" (for users without usernames). + Type of the entity. Can be: + + - "mention": ``@username``. + - "hashtag": ``#hashtag``. + - "cashtag": ``$PYRO``. + - "bot_command": ``/start@pyrogrambot``. + - "url": ``https://pyrogram.org`` (see *url* below). + - "email": ``do-not-reply@pyrogram.org``. + - "phone_number": ``+69-420-1337``. + - "bold": **bold text**. + - "italic": *italic text*. + - "underline": underlined text. + - "strikethrough": strikethrough text. + - "code": monowidth string. + - "pre": monowidth block (see *language* below). + - "text_link": for clickable text URLs. + - "text_mention": for users without usernames (see *user* below). offset (``int``): Offset in UTF-16 code units to the start of the entity.