mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Optimize Message.send_copy
This commit is contained in:
parent
2843a66e61
commit
cf7786a467
1 changed files with 6 additions and 9 deletions
|
|
@ -1581,17 +1581,14 @@ class Message(base.TelegramObject):
|
|||
:return:
|
||||
"""
|
||||
kwargs = {
|
||||
"chat_id": chat_id,
|
||||
"reply_markup": reply_markup or self.reply_markup,
|
||||
"parse_mode": ParseMode.HTML
|
||||
}
|
||||
"chat_id": chat_id,
|
||||
"reply_markup": reply_markup or self.reply_markup,
|
||||
"parse_mode": ParseMode.HTML,
|
||||
"disable_notification": disable_notification,
|
||||
"reply_to_message_id": reply_to_message_id,
|
||||
}
|
||||
text = self.html_text if (self.text or self.caption) else None
|
||||
|
||||
if disable_notification is not None:
|
||||
kwargs["disable_notification"] = disable_notification
|
||||
if reply_to_message_id is not None:
|
||||
kwargs["reply_to_message_id"] = reply_to_message_id
|
||||
|
||||
if self.text:
|
||||
return await self.bot.send_message(text=text, **kwargs)
|
||||
elif self.audio:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue