Skip to content

Commit b5c3912

Browse files
committed
Small code and docs fixes
1 parent 46ced1a commit b5c3912

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

pyrogram/methods/messages/get_media_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from typing import Union, List
2121

2222
from pyrogram.scaffold import Scaffold
23-
from pyrogram.types import list
23+
from pyrogram import types
2424

2525
log = logging.getLogger(__name__)
2626

@@ -56,4 +56,4 @@ async def get_media_group(
5656
if media_group_id is None:
5757
raise ValueError("The message doesn't belong to a media group")
5858

59-
return list.List(msg for msg in messages if msg.media_group_id == media_group_id)
59+
return types.List(msg for msg in messages if msg.media_group_id == media_group_id)

pyrogram/types/messages_and_media/message_entity.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,23 @@ class MessageEntity(Object):
7777
7878
Parameters:
7979
type (``str``):
80-
Type of the entity.
81-
Can be "mention" (``@username``), "hashtag" (``#hashtag``), "cashtag" (``$PYRO``),
82-
"bot_command" (``/start@pyrogrambot``), "url" (``https://pyrogram.org``),
83-
"email" (``do-not-reply@pyrogram.org``), "phone_number" (``+1-420-069-1337``), "bold" (**bold text**),
84-
"italic" (*italic text*), "underline" (underlined text), "strikethrough" (strikethrough text),
85-
"code" (monowidth string), "pre" (monowidth block), "text_link" (for clickable text URLs),
86-
"text_mention" (for users without usernames).
80+
Type of the entity. Can be:
81+
82+
- "mention": ``@username``.
83+
- "hashtag": ``#hashtag``.
84+
- "cashtag": ``$PYRO``.
85+
- "bot_command": ``/start@pyrogrambot``.
86+
- "url": ``https://pyrogram.org`` (see *url* below).
87+
- "email": ``do-not-reply@pyrogram.org``.
88+
- "phone_number": ``+69-420-1337``.
89+
- "bold": **bold text**.
90+
- "italic": *italic text*.
91+
- "underline": underlined text.
92+
- "strikethrough": strikethrough text.
93+
- "code": monowidth string.
94+
- "pre": monowidth block (see *language* below).
95+
- "text_link": for clickable text URLs.
96+
- "text_mention": for users without usernames (see *user* below).
8797
8898
offset (``int``):
8999
Offset in UTF-16 code units to the start of the entity.

0 commit comments

Comments
 (0)