mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Revert "Add business_connection_id parameter in"
This reverts commit 4d6fb409b8.
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
48e8d0c4a1
commit
61398bc5a4
8 changed files with 57 additions and 216 deletions
|
|
@ -32,8 +32,7 @@ class EditMessageCaption:
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
caption_entities: List["types.MessageEntity"] = None,
|
caption_entities: List["types.MessageEntity"] = None,
|
||||||
invert_media: bool = False,
|
invert_media: bool = False,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Message":
|
) -> "types.Message":
|
||||||
"""Edit the caption of media messages.
|
"""Edit the caption of media messages.
|
||||||
|
|
||||||
|
|
@ -65,9 +64,6 @@ class EditMessageCaption:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
||||||
|
|
||||||
|
|
@ -83,6 +79,5 @@ class EditMessageCaption:
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
entities=caption_entities,
|
entities=caption_entities,
|
||||||
invert_media=invert_media,
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=business_connection_id
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,6 @@ from pyrogram import types
|
||||||
from pyrogram import utils
|
from pyrogram import utils
|
||||||
from pyrogram.file_id import FileType
|
from pyrogram.file_id import FileType
|
||||||
|
|
||||||
from .inline_session import get_session
|
|
||||||
|
|
||||||
|
|
||||||
class EditMessageMedia:
|
class EditMessageMedia:
|
||||||
async def edit_message_media(
|
async def edit_message_media(
|
||||||
|
|
@ -39,8 +37,7 @@ class EditMessageMedia:
|
||||||
media: "types.InputMedia",
|
media: "types.InputMedia",
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
invert_media: bool = False,
|
invert_media: bool = False
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Message":
|
) -> "types.Message":
|
||||||
"""Edit animation, audio, document, photo or video messages.
|
"""Edit animation, audio, document, photo or video messages.
|
||||||
|
|
||||||
|
|
@ -72,9 +69,6 @@ class EditMessageMedia:
|
||||||
invert_media (``bool``, *optional*):
|
invert_media (``bool``, *optional*):
|
||||||
Inverts the position of the media and caption.
|
Inverts the position of the media and caption.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
||||||
|
|
||||||
|
|
@ -279,35 +273,17 @@ class EditMessageMedia:
|
||||||
else:
|
else:
|
||||||
media = utils.get_input_media_from_file_id(media.media, FileType.DOCUMENT)
|
media = utils.get_input_media_from_file_id(media.media, FileType.DOCUMENT)
|
||||||
|
|
||||||
rpc = raw.functions.messages.EditMessage(
|
r = await self.invoke(
|
||||||
peer=await self.resolve_peer(chat_id),
|
raw.functions.messages.EditMessage(
|
||||||
id=message_id,
|
peer=await self.resolve_peer(chat_id),
|
||||||
media=media,
|
id=message_id,
|
||||||
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
media=media,
|
||||||
message=message,
|
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
||||||
entities=entities,
|
message=message,
|
||||||
invert_media=invert_media
|
entities=entities,
|
||||||
|
invert_media=invert_media
|
||||||
|
)
|
||||||
)
|
)
|
||||||
session = None
|
|
||||||
business_connection = None
|
|
||||||
if business_connection_id:
|
|
||||||
business_connection = self.business_user_connection_cache[business_connection_id]
|
|
||||||
if not business_connection:
|
|
||||||
business_connection = await self.get_business_connection(business_connection_id)
|
|
||||||
session = await get_session(
|
|
||||||
self,
|
|
||||||
business_connection._raw.connection.dc_id
|
|
||||||
)
|
|
||||||
if business_connection_id:
|
|
||||||
r = await session.invoke(
|
|
||||||
raw.functions.InvokeWithBusinessConnection(
|
|
||||||
query=rpc,
|
|
||||||
connection_id=business_connection_id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# await session.stop()
|
|
||||||
else:
|
|
||||||
r = await self.invoke(rpc)
|
|
||||||
|
|
||||||
for i in r.updates:
|
for i in r.updates:
|
||||||
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
||||||
|
|
@ -316,18 +292,3 @@ class EditMessageMedia:
|
||||||
{i.id: i for i in r.users},
|
{i.id: i for i in r.users},
|
||||||
{i.id: i for i in r.chats}
|
{i.id: i for i in r.chats}
|
||||||
)
|
)
|
||||||
elif isinstance(
|
|
||||||
i,
|
|
||||||
(
|
|
||||||
raw.types.UpdateBotEditBusinessMessage
|
|
||||||
)
|
|
||||||
):
|
|
||||||
return await types.Message._parse(
|
|
||||||
self,
|
|
||||||
i.message,
|
|
||||||
{i.id: i for i in r.users},
|
|
||||||
{i.id: i for i in r.chats},
|
|
||||||
business_connection_id=getattr(i, "connection_id", business_connection_id),
|
|
||||||
raw_reply_to_message=i.reply_to_message,
|
|
||||||
replies=0
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,8 @@
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
from pyrogram import raw, types
|
from pyrogram import raw
|
||||||
|
from pyrogram import types
|
||||||
from .inline_session import get_session
|
|
||||||
|
|
||||||
|
|
||||||
class EditMessageReplyMarkup:
|
class EditMessageReplyMarkup:
|
||||||
|
|
@ -31,7 +30,6 @@ class EditMessageReplyMarkup:
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
message_id: int,
|
message_id: int,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None,
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Message":
|
) -> "types.Message":
|
||||||
"""Edit only the reply markup of messages sent by the bot.
|
"""Edit only the reply markup of messages sent by the bot.
|
||||||
|
|
||||||
|
|
@ -50,9 +48,6 @@ class EditMessageReplyMarkup:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
||||||
|
|
||||||
|
|
@ -67,57 +62,18 @@ class EditMessageReplyMarkup:
|
||||||
InlineKeyboardMarkup([[
|
InlineKeyboardMarkup([[
|
||||||
InlineKeyboardButton("New button", callback_data="new_data")]]))
|
InlineKeyboardButton("New button", callback_data="new_data")]]))
|
||||||
"""
|
"""
|
||||||
rpc = raw.functions.messages.EditMessage(
|
r = await self.invoke(
|
||||||
peer=await self.resolve_peer(chat_id),
|
raw.functions.messages.EditMessage(
|
||||||
id=message_id,
|
peer=await self.resolve_peer(chat_id),
|
||||||
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
id=message_id,
|
||||||
|
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
session = None
|
|
||||||
business_connection = None
|
|
||||||
if business_connection_id:
|
|
||||||
business_connection = self.business_user_connection_cache[business_connection_id]
|
|
||||||
if not business_connection:
|
|
||||||
business_connection = await self.get_business_connection(business_connection_id)
|
|
||||||
session = await get_session(
|
|
||||||
self,
|
|
||||||
business_connection._raw.connection.dc_id
|
|
||||||
)
|
|
||||||
if business_connection_id:
|
|
||||||
r = await session.invoke(
|
|
||||||
raw.functions.InvokeWithBusinessConnection(
|
|
||||||
query=rpc,
|
|
||||||
connection_id=business_connection_id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# await session.stop()
|
|
||||||
else:
|
|
||||||
r = await self.invoke(rpc)
|
|
||||||
|
|
||||||
for i in r.updates:
|
for i in r.updates:
|
||||||
if isinstance(
|
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
||||||
i,
|
|
||||||
(
|
|
||||||
raw.types.UpdateEditMessage,
|
|
||||||
raw.types.UpdateEditChannelMessage
|
|
||||||
)
|
|
||||||
):
|
|
||||||
return await types.Message._parse(
|
return await types.Message._parse(
|
||||||
self, i.message,
|
self, i.message,
|
||||||
{i.id: i for i in r.users},
|
{i.id: i for i in r.users},
|
||||||
{i.id: i for i in r.chats}
|
{i.id: i for i in r.chats}
|
||||||
)
|
)
|
||||||
elif isinstance(
|
|
||||||
i,
|
|
||||||
(
|
|
||||||
raw.types.UpdateBotEditBusinessMessage
|
|
||||||
)
|
|
||||||
):
|
|
||||||
return await types.Message._parse(
|
|
||||||
self,
|
|
||||||
i.message,
|
|
||||||
{i.id: i for i in r.users},
|
|
||||||
{i.id: i for i in r.chats},
|
|
||||||
business_connection_id=getattr(i, "connection_id", business_connection_id),
|
|
||||||
raw_reply_to_message=i.reply_to_message,
|
|
||||||
replies=0
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ class EditMessageText:
|
||||||
entities: List["types.MessageEntity"] = None,
|
entities: List["types.MessageEntity"] = None,
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
invert_media: bool = None,
|
invert_media: bool = None,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Message":
|
) -> "types.Message":
|
||||||
"""Edit the text of messages.
|
"""Edit the text of messages.
|
||||||
|
|
||||||
|
|
@ -71,9 +70,6 @@ class EditMessageText:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
:obj:`~pyrogram.types.Message`: On success, the edited message is returned.
|
||||||
|
|
||||||
|
|
@ -89,34 +85,16 @@ class EditMessageText:
|
||||||
disable_web_page_preview=True)
|
disable_web_page_preview=True)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
rpc = raw.functions.messages.EditMessage(
|
r = await self.invoke(
|
||||||
peer=await self.resolve_peer(chat_id),
|
raw.functions.messages.EditMessage(
|
||||||
id=message_id,
|
peer=await self.resolve_peer(chat_id),
|
||||||
no_webpage=disable_web_page_preview or None,
|
id=message_id,
|
||||||
invert_media=invert_media,
|
no_webpage=disable_web_page_preview or None,
|
||||||
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
invert_media=invert_media,
|
||||||
**await utils.parse_text_entities(self, text, parse_mode, entities)
|
reply_markup=await reply_markup.write(self) if reply_markup else None,
|
||||||
|
**await utils.parse_text_entities(self, text, parse_mode, entities)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
session = None
|
|
||||||
business_connection = None
|
|
||||||
if business_connection_id:
|
|
||||||
business_connection = self.business_user_connection_cache[business_connection_id]
|
|
||||||
if not business_connection:
|
|
||||||
business_connection = await self.get_business_connection(business_connection_id)
|
|
||||||
session = await get_session(
|
|
||||||
self,
|
|
||||||
business_connection._raw.connection.dc_id
|
|
||||||
)
|
|
||||||
if business_connection_id:
|
|
||||||
r = await session.invoke(
|
|
||||||
raw.functions.InvokeWithBusinessConnection(
|
|
||||||
query=rpc,
|
|
||||||
connection_id=business_connection_id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# await session.stop()
|
|
||||||
else:
|
|
||||||
r = await self.invoke(rpc)
|
|
||||||
|
|
||||||
for i in r.updates:
|
for i in r.updates:
|
||||||
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
||||||
|
|
@ -125,18 +103,3 @@ class EditMessageText:
|
||||||
{i.id: i for i in r.users},
|
{i.id: i for i in r.users},
|
||||||
{i.id: i for i in r.chats}
|
{i.id: i for i in r.chats}
|
||||||
)
|
)
|
||||||
elif isinstance(
|
|
||||||
i,
|
|
||||||
(
|
|
||||||
raw.types.UpdateBotEditBusinessMessage
|
|
||||||
)
|
|
||||||
):
|
|
||||||
return await types.Message._parse(
|
|
||||||
self,
|
|
||||||
i.message,
|
|
||||||
{i.id: i for i in r.users},
|
|
||||||
{i.id: i for i in r.chats},
|
|
||||||
business_connection_id=getattr(i, "connection_id", business_connection_id),
|
|
||||||
raw_reply_to_message=i.reply_to_message,
|
|
||||||
replies=0
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,8 @@
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
from pyrogram import raw, types
|
from pyrogram import raw
|
||||||
|
from pyrogram import types
|
||||||
from .inline_session import get_session
|
|
||||||
|
|
||||||
|
|
||||||
class StopPoll:
|
class StopPoll:
|
||||||
|
|
@ -30,8 +29,7 @@ class StopPoll:
|
||||||
self: "pyrogram.Client",
|
self: "pyrogram.Client",
|
||||||
chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
message_id: int,
|
message_id: int,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Poll":
|
) -> "types.Poll":
|
||||||
"""Stop a poll which was sent by you.
|
"""Stop a poll which was sent by you.
|
||||||
|
|
||||||
|
|
@ -52,9 +50,6 @@ class StopPoll:
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:obj:`~pyrogram.types.Poll`: On success, the stopped poll with the final results is returned.
|
:obj:`~pyrogram.types.Poll`: On success, the stopped poll with the final results is returned.
|
||||||
|
|
||||||
|
|
@ -65,38 +60,20 @@ class StopPoll:
|
||||||
"""
|
"""
|
||||||
poll = (await self.get_messages(chat_id, message_id)).poll
|
poll = (await self.get_messages(chat_id, message_id)).poll
|
||||||
|
|
||||||
rpc = raw.functions.messages.EditMessage(
|
r = await self.invoke(
|
||||||
peer=await self.resolve_peer(chat_id),
|
raw.functions.messages.EditMessage(
|
||||||
id=message_id,
|
peer=await self.resolve_peer(chat_id),
|
||||||
media=raw.types.InputMediaPoll(
|
id=message_id,
|
||||||
poll=raw.types.Poll(
|
media=raw.types.InputMediaPoll(
|
||||||
id=int(poll.id),
|
poll=raw.types.Poll(
|
||||||
closed=True,
|
id=int(poll.id),
|
||||||
question="",
|
closed=True,
|
||||||
answers=[]
|
question="",
|
||||||
)
|
answers=[]
|
||||||
),
|
)
|
||||||
reply_markup=await reply_markup.write(self) if reply_markup else None
|
),
|
||||||
|
reply_markup=await reply_markup.write(self) if reply_markup else None
|
||||||
|
)
|
||||||
)
|
)
|
||||||
session = None
|
|
||||||
business_connection = None
|
|
||||||
if business_connection_id:
|
|
||||||
business_connection = self.business_user_connection_cache[business_connection_id]
|
|
||||||
if not business_connection:
|
|
||||||
business_connection = await self.get_business_connection(business_connection_id)
|
|
||||||
session = await get_session(
|
|
||||||
self,
|
|
||||||
business_connection._raw.connection.dc_id
|
|
||||||
)
|
|
||||||
if business_connection_id:
|
|
||||||
r = await session.invoke(
|
|
||||||
raw.functions.InvokeWithBusinessConnection(
|
|
||||||
query=rpc,
|
|
||||||
connection_id=business_connection_id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# await session.stop()
|
|
||||||
else:
|
|
||||||
r = await self.invoke(rpc)
|
|
||||||
|
|
||||||
return types.Poll._parse(self, r.updates[0])
|
return types.Poll._parse(self, r.updates[0])
|
||||||
|
|
|
||||||
|
|
@ -215,8 +215,7 @@ class CallbackQuery(Object, Update):
|
||||||
text=text,
|
text=text,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
disable_web_page_preview=disable_web_page_preview,
|
disable_web_page_preview=disable_web_page_preview,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.message.business_connection_id
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return await self._client.edit_inline_text(
|
return await self._client.edit_inline_text(
|
||||||
|
|
@ -285,8 +284,7 @@ class CallbackQuery(Object, Update):
|
||||||
chat_id=self.message.chat.id,
|
chat_id=self.message.chat.id,
|
||||||
message_id=self.message.id,
|
message_id=self.message.id,
|
||||||
media=media,
|
media=media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.message.business_connection_id
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return await self._client.edit_inline_media(
|
return await self._client.edit_inline_media(
|
||||||
|
|
@ -318,8 +316,7 @@ class CallbackQuery(Object, Update):
|
||||||
return await self._client.edit_message_reply_markup(
|
return await self._client.edit_message_reply_markup(
|
||||||
chat_id=self.message.chat.id,
|
chat_id=self.message.chat.id,
|
||||||
message_id=self.message.id,
|
message_id=self.message.id,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.message.business_connection_id,
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return await self._client.edit_inline_reply_markup(
|
return await self._client.edit_inline_reply_markup(
|
||||||
|
|
|
||||||
|
|
@ -4121,8 +4121,7 @@ class Message(Object, Update):
|
||||||
entities=entities,
|
entities=entities,
|
||||||
disable_web_page_preview=disable_web_page_preview,
|
disable_web_page_preview=disable_web_page_preview,
|
||||||
invert_media=invert_media,
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.business_connection_id
|
|
||||||
)
|
)
|
||||||
|
|
||||||
edit = edit_text
|
edit = edit_text
|
||||||
|
|
@ -4229,8 +4228,7 @@ class Message(Object, Update):
|
||||||
message_id=self.id,
|
message_id=self.id,
|
||||||
media=media,
|
media=media,
|
||||||
invert_media=invert_media,
|
invert_media=invert_media,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.business_connection_id
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async def edit_reply_markup(self, reply_markup: "types.InlineKeyboardMarkup" = None) -> "Message":
|
async def edit_reply_markup(self, reply_markup: "types.InlineKeyboardMarkup" = None) -> "Message":
|
||||||
|
|
@ -4265,8 +4263,7 @@ class Message(Object, Update):
|
||||||
return await self._client.edit_message_reply_markup(
|
return await self._client.edit_message_reply_markup(
|
||||||
chat_id=self.chat.id,
|
chat_id=self.chat.id,
|
||||||
message_id=self.id,
|
message_id=self.id,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=self.business_connection_id
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async def forward(
|
async def forward(
|
||||||
|
|
|
||||||
|
|
@ -218,8 +218,7 @@ class Poll(Object, Update):
|
||||||
|
|
||||||
async def stop(
|
async def stop(
|
||||||
self,
|
self,
|
||||||
reply_markup: "types.InlineKeyboardMarkup" = None,
|
reply_markup: "types.InlineKeyboardMarkup" = None
|
||||||
business_connection_id: str = None
|
|
||||||
) -> "types.Poll":
|
) -> "types.Poll":
|
||||||
"""Bound method *stop* of :obj:`~pyrogram.types.Poll`.
|
"""Bound method *stop* of :obj:`~pyrogram.types.Poll`.
|
||||||
|
|
||||||
|
|
@ -236,9 +235,6 @@ class Poll(Object, Update):
|
||||||
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
|
||||||
An InlineKeyboardMarkup object.
|
An InlineKeyboardMarkup object.
|
||||||
|
|
||||||
business_connection_id (``str``, *optional*):
|
|
||||||
Unique identifier of the business connection on behalf of which the message to be edited was sent
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
|
@ -254,6 +250,5 @@ class Poll(Object, Update):
|
||||||
return await self._client.stop_poll(
|
return await self._client.stop_poll(
|
||||||
chat_id=self.chat.id,
|
chat_id=self.chat.id,
|
||||||
message_id=self.id,
|
message_id=self.id,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup
|
||||||
business_connection_id=business_connection_id
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue