mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix formatting
This commit is contained in:
parent
2f4065c958
commit
9ede5bd3c5
|
@ -629,7 +629,7 @@ class Client:
|
|||
markdown=markdown,
|
||||
html=html,
|
||||
link_preview=link_preview,
|
||||
buttons=buttons
|
||||
buttons=buttons,
|
||||
)
|
||||
|
||||
async def forward_messages(
|
||||
|
|
|
@ -117,7 +117,9 @@ async def get_chats(self: Client, chats: Sequence[ChatLike]) -> List[Chat]:
|
|||
]
|
||||
|
||||
|
||||
async def resolve_to_packed(client: Client, chat: Union[ChatLike, abcs.InputPeer, abcs.Peer]) -> PackedChat:
|
||||
async def resolve_to_packed(
|
||||
client: Client, chat: Union[ChatLike, abcs.InputPeer, abcs.Peer]
|
||||
) -> PackedChat:
|
||||
if isinstance(chat, PackedChat):
|
||||
return chat
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from .callback import Data
|
||||
from .combinators import All, Any, Filter, Not
|
||||
from .common import Chats, ChatType, Senders
|
||||
from .messages import Command, Forward, Incoming, Media, Outgoing, Reply, Text
|
||||
from .callback import Data
|
||||
|
||||
__all__ = [
|
||||
"All",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from .combinators import Combinable
|
||||
from ..event import Event
|
||||
from .combinators import Combinable
|
||||
|
||||
|
||||
class Data(Combinable):
|
||||
|
|
|
@ -158,9 +158,7 @@ class Media(Combinable):
|
|||
|
||||
__slots__ = "_types"
|
||||
|
||||
def __init__(
|
||||
self, *types: Literal["photo", "audio", "video"]
|
||||
) -> None:
|
||||
def __init__(self, *types: Literal["photo", "audio", "video"]) -> None:
|
||||
self._types = types or None
|
||||
|
||||
@property
|
||||
|
|
|
@ -3,10 +3,10 @@ from __future__ import annotations
|
|||
from typing import TYPE_CHECKING, Dict, Optional, Self
|
||||
|
||||
from ...tl import abcs, functions, types
|
||||
from ..types import Chat, Message
|
||||
from .event import Event
|
||||
from ..types.chat import peer_id
|
||||
from ..client.messages import CherryPickedList
|
||||
from ..types import Chat, Message
|
||||
from ..types.chat import peer_id
|
||||
from .event import Event
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..client.client import Client
|
||||
|
@ -84,7 +84,11 @@ class ButtonCallback(Event):
|
|||
chat = await self._client._resolve_to_packed(pid)
|
||||
|
||||
lst = CherryPickedList(self._client, chat, [])
|
||||
lst._ids.append(types.InputMessageCallbackQuery(id=self._raw.msg_id, query_id=self._raw.query_id))
|
||||
lst._ids.append(
|
||||
types.InputMessageCallbackQuery(
|
||||
id=self._raw.msg_id, query_id=self._raw.query_id
|
||||
)
|
||||
)
|
||||
|
||||
message = (await lst)[0]
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ from .._impl.client.events.filters import (
|
|||
Chats,
|
||||
ChatType,
|
||||
Command,
|
||||
Data,
|
||||
Filter,
|
||||
Forward,
|
||||
Incoming,
|
||||
|
@ -22,7 +23,6 @@ from .._impl.client.events.filters import (
|
|||
Reply,
|
||||
Senders,
|
||||
Text,
|
||||
Data,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
|
@ -40,5 +40,5 @@ __all__ = [
|
|||
"Reply",
|
||||
"Senders",
|
||||
"Text",
|
||||
"Data"
|
||||
"Data",
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user