Shortcut for:: await bot.copy_message( chat_id=chat_id, from_chat_id=update.effective_message.chat_id, message_id=update.effective_message.message_id, direct_messages_topic_id=self.direct_messages_topic.topic_id,
(
self,
chat_id: int | str,
caption: str | None = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Sequence["MessageEntity"] | None = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int | None = None,
reply_parameters: "ReplyParameters | None" = None,
show_caption_above_media: bool | None = None,
allow_paid_broadcast: bool | None = None,
video_start_timestamp: int | None = None,
suggested_post_parameters: "SuggestedPostParameters | None" = None,
message_effect_id: str | None = None,
*,
reply_to_message_id: int | None = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
)
| 4202 | ) |
| 4203 | |
| 4204 | async def copy( |
| 4205 | self, |
| 4206 | chat_id: int | str, |
| 4207 | caption: str | None = None, |
| 4208 | parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 4209 | caption_entities: Sequence["MessageEntity"] | None = None, |
| 4210 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 4211 | reply_markup: "ReplyMarkup | None" = None, |
| 4212 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 4213 | message_thread_id: int | None = None, |
| 4214 | reply_parameters: "ReplyParameters | None" = None, |
| 4215 | show_caption_above_media: bool | None = None, |
| 4216 | allow_paid_broadcast: bool | None = None, |
| 4217 | video_start_timestamp: int | None = None, |
| 4218 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 4219 | message_effect_id: str | None = None, |
| 4220 | *, |
| 4221 | reply_to_message_id: int | None = None, |
| 4222 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 4223 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 4224 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 4225 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 4226 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 4227 | api_kwargs: JSONDict | None = None, |
| 4228 | ) -> "MessageId": |
| 4229 | """Shortcut for:: |
| 4230 | |
| 4231 | await bot.copy_message( |
| 4232 | chat_id=chat_id, |
| 4233 | from_chat_id=update.effective_message.chat_id, |
| 4234 | message_id=update.effective_message.message_id, |
| 4235 | direct_messages_topic_id=self.direct_messages_topic.topic_id, |
| 4236 | *args, |
| 4237 | **kwargs |
| 4238 | ) |
| 4239 | |
| 4240 | For the documentation of the arguments, please see :meth:`telegram.Bot.copy_message`. |
| 4241 | |
| 4242 | Returns: |
| 4243 | :class:`telegram.MessageId`: On success, returns the MessageId of the sent message. |
| 4244 | |
| 4245 | """ |
| 4246 | return await self.get_bot().copy_message( |
| 4247 | chat_id=chat_id, |
| 4248 | from_chat_id=self.chat_id, |
| 4249 | message_id=self.message_id, |
| 4250 | caption=caption, |
| 4251 | video_start_timestamp=video_start_timestamp, |
| 4252 | parse_mode=parse_mode, |
| 4253 | caption_entities=caption_entities, |
| 4254 | disable_notification=disable_notification, |
| 4255 | reply_to_message_id=reply_to_message_id, |
| 4256 | reply_parameters=reply_parameters, |
| 4257 | allow_sending_without_reply=allow_sending_without_reply, |
| 4258 | reply_markup=reply_markup, |
| 4259 | read_timeout=read_timeout, |
| 4260 | write_timeout=write_timeout, |
| 4261 | connect_timeout=connect_timeout, |