mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Small code and docs fixes
This commit is contained in:
parent
46ced1aa11
commit
b5c39121c3
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user