mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-24 17:22:36 +01:00
Add *args, **kwargs to Message.forward() (#1574)
This commit is contained in:
parent
8cdb20a85a
commit
93449443b2
1 changed files with 7 additions and 5 deletions
|
@ -742,13 +742,14 @@ class Message(TelegramObject):
|
||||||
self._quote(kwargs)
|
self._quote(kwargs)
|
||||||
return self.bot.send_poll(self.chat_id, *args, **kwargs)
|
return self.bot.send_poll(self.chat_id, *args, **kwargs)
|
||||||
|
|
||||||
def forward(self, chat_id, disable_notification=False):
|
def forward(self, chat_id, *args, **kwargs):
|
||||||
"""Shortcut for::
|
"""Shortcut for::
|
||||||
|
|
||||||
bot.forward_message(chat_id=chat_id,
|
bot.forward_message(chat_id=chat_id,
|
||||||
from_chat_id=update.message.chat_id,
|
from_chat_id=update.message.chat_id,
|
||||||
disable_notification=disable_notification,
|
message_id=update.message.message_id,
|
||||||
message_id=update.message.message_id)
|
*args,
|
||||||
|
**kwargs)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
:class:`telegram.Message`: On success, instance representing the message forwarded.
|
:class:`telegram.Message`: On success, instance representing the message forwarded.
|
||||||
|
@ -757,8 +758,9 @@ class Message(TelegramObject):
|
||||||
return self.bot.forward_message(
|
return self.bot.forward_message(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
from_chat_id=self.chat_id,
|
from_chat_id=self.chat_id,
|
||||||
disable_notification=disable_notification,
|
message_id=self.message_id,
|
||||||
message_id=self.message_id)
|
*args,
|
||||||
|
**kwargs)
|
||||||
|
|
||||||
def edit_text(self, *args, **kwargs):
|
def edit_text(self, *args, **kwargs):
|
||||||
"""Shortcut for::
|
"""Shortcut for::
|
||||||
|
|
Loading…
Add table
Reference in a new issue