|
33 | 33 |
|
34 | 34 | log = logging.getLogger(__name__) |
35 | 35 |
|
| 36 | + |
36 | 37 | class Str(str): |
37 | 38 | def __init__(self, *args): |
38 | 39 | super().__init__() |
@@ -2107,6 +2108,11 @@ async def reply_animation( |
2107 | 2108 | Raises: |
2108 | 2109 | RPCError: In case of a Telegram RPC error. |
2109 | 2110 | """ |
| 2111 | + if reply_parameters is None: |
| 2112 | + reply_parameters = types.ReplyParameters( |
| 2113 | + message_id=self.id |
| 2114 | + ) |
| 2115 | + |
2110 | 2116 | if quote is not None: |
2111 | 2117 | log.warning( |
2112 | 2118 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -2484,6 +2490,11 @@ async def reply_audio( |
2484 | 2490 | Raises: |
2485 | 2491 | RPCError: In case of a Telegram RPC error. |
2486 | 2492 | """ |
| 2493 | + if reply_parameters is None: |
| 2494 | + reply_parameters = types.ReplyParameters( |
| 2495 | + message_id=self.id |
| 2496 | + ) |
| 2497 | + |
2487 | 2498 | if quote is not None: |
2488 | 2499 | log.warning( |
2489 | 2500 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -2789,6 +2800,11 @@ async def reply_contact( |
2789 | 2800 | Raises: |
2790 | 2801 | RPCError: In case of a Telegram RPC error. |
2791 | 2802 | """ |
| 2803 | + if reply_parameters is None: |
| 2804 | + reply_parameters = types.ReplyParameters( |
| 2805 | + message_id=self.id |
| 2806 | + ) |
| 2807 | + |
2792 | 2808 | if quote is not None: |
2793 | 2809 | log.warning( |
2794 | 2810 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -3079,6 +3095,11 @@ async def reply_document( |
3079 | 3095 | Raises: |
3080 | 3096 | RPCError: In case of a Telegram RPC error. |
3081 | 3097 | """ |
| 3098 | + if reply_parameters is None: |
| 3099 | + reply_parameters = types.ReplyParameters( |
| 3100 | + message_id=self.id |
| 3101 | + ) |
| 3102 | + |
3082 | 3103 | if quote is not None: |
3083 | 3104 | log.warning( |
3084 | 3105 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -3366,6 +3387,11 @@ async def reply_game( |
3366 | 3387 | Raises: |
3367 | 3388 | RPCError: In case of a Telegram RPC error. |
3368 | 3389 | """ |
| 3390 | + if reply_parameters is None: |
| 3391 | + reply_parameters = types.ReplyParameters( |
| 3392 | + message_id=self.id |
| 3393 | + ) |
| 3394 | + |
3369 | 3395 | if quote is not None: |
3370 | 3396 | log.warning( |
3371 | 3397 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -3632,6 +3658,11 @@ async def reply_invoice( |
3632 | 3658 | Returns: |
3633 | 3659 | :obj:`~pyrogram.types.Message`: On success, the sent invoice message is returned. |
3634 | 3660 | """ |
| 3661 | + if reply_parameters is None: |
| 3662 | + reply_parameters = types.ReplyParameters( |
| 3663 | + message_id=self.id |
| 3664 | + ) |
| 3665 | + |
3635 | 3666 | if message_thread_id is None: |
3636 | 3667 | message_thread_id = self.message_thread_id |
3637 | 3668 |
|
@@ -3982,6 +4013,11 @@ async def reply_location( |
3982 | 4013 | Raises: |
3983 | 4014 | RPCError: In case of a Telegram RPC error. |
3984 | 4015 | """ |
| 4016 | + if reply_parameters is None: |
| 4017 | + reply_parameters = types.ReplyParameters( |
| 4018 | + message_id=self.id |
| 4019 | + ) |
| 4020 | + |
3985 | 4021 | if quote is not None: |
3986 | 4022 | log.warning( |
3987 | 4023 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -4203,6 +4239,11 @@ async def reply_media_group( |
4203 | 4239 | Raises: |
4204 | 4240 | RPCError: In case of a Telegram RPC error. |
4205 | 4241 | """ |
| 4242 | + if reply_parameters is None: |
| 4243 | + reply_parameters = types.ReplyParameters( |
| 4244 | + message_id=self.id |
| 4245 | + ) |
| 4246 | + |
4206 | 4247 | if quote is not None: |
4207 | 4248 | log.warning( |
4208 | 4249 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -4422,6 +4463,11 @@ async def reply( |
4422 | 4463 | Raises: |
4423 | 4464 | RPCError: In case of a Telegram RPC error. |
4424 | 4465 | """ |
| 4466 | + if reply_parameters is None: |
| 4467 | + reply_parameters = types.ReplyParameters( |
| 4468 | + message_id=self.id |
| 4469 | + ) |
| 4470 | + |
4425 | 4471 | if quote is not None: |
4426 | 4472 | log.warning( |
4427 | 4473 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -4746,6 +4792,11 @@ async def reply_photo( |
4746 | 4792 | Raises: |
4747 | 4793 | RPCError: In case of a Telegram RPC error. |
4748 | 4794 | """ |
| 4795 | + if reply_parameters is None: |
| 4796 | + reply_parameters = types.ReplyParameters( |
| 4797 | + message_id=self.id |
| 4798 | + ) |
| 4799 | + |
4749 | 4800 | if quote is not None: |
4750 | 4801 | log.warning( |
4751 | 4802 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -5126,6 +5177,11 @@ async def reply_poll( |
5126 | 5177 | Raises: |
5127 | 5178 | RPCError: In case of a Telegram RPC error. |
5128 | 5179 | """ |
| 5180 | + if reply_parameters is None: |
| 5181 | + reply_parameters = types.ReplyParameters( |
| 5182 | + message_id=self.id |
| 5183 | + ) |
| 5184 | + |
5129 | 5185 | if quote is not None: |
5130 | 5186 | log.warning( |
5131 | 5187 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -5437,6 +5493,11 @@ async def reply_dice( |
5437 | 5493 | Returns: |
5438 | 5494 | :obj:`~pyrogram.types.Message`: On success, the sent dice message is returned. |
5439 | 5495 | """ |
| 5496 | + if reply_parameters is None: |
| 5497 | + reply_parameters = types.ReplyParameters( |
| 5498 | + message_id=self.id |
| 5499 | + ) |
| 5500 | + |
5440 | 5501 | if message_thread_id is None: |
5441 | 5502 | message_thread_id = self.message_thread_id |
5442 | 5503 |
|
@@ -5690,6 +5751,11 @@ async def reply_sticker( |
5690 | 5751 | Raises: |
5691 | 5752 | RPCError: In case of a Telegram RPC error. |
5692 | 5753 | """ |
| 5754 | + if reply_parameters is None: |
| 5755 | + reply_parameters = types.ReplyParameters( |
| 5756 | + message_id=self.id |
| 5757 | + ) |
| 5758 | + |
5693 | 5759 | if quote is not None: |
5694 | 5760 | log.warning( |
5695 | 5761 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -5983,6 +6049,11 @@ async def reply_venue( |
5983 | 6049 | Raises: |
5984 | 6050 | RPCError: In case of a Telegram RPC error. |
5985 | 6051 | """ |
| 6052 | + if reply_parameters is None: |
| 6053 | + reply_parameters = types.ReplyParameters( |
| 6054 | + message_id=self.id |
| 6055 | + ) |
| 6056 | + |
5986 | 6057 | if quote is not None: |
5987 | 6058 | log.warning( |
5988 | 6059 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -6323,6 +6394,11 @@ async def reply_video( |
6323 | 6394 | Raises: |
6324 | 6395 | RPCError: In case of a Telegram RPC error. |
6325 | 6396 | """ |
| 6397 | + if reply_parameters is None: |
| 6398 | + reply_parameters = types.ReplyParameters( |
| 6399 | + message_id=self.id |
| 6400 | + ) |
| 6401 | + |
6326 | 6402 | if quote is not None: |
6327 | 6403 | log.warning( |
6328 | 6404 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -6737,6 +6813,11 @@ async def reply_video_note( |
6737 | 6813 | Raises: |
6738 | 6814 | RPCError: In case of a Telegram RPC error. |
6739 | 6815 | """ |
| 6816 | + if reply_parameters is None: |
| 6817 | + reply_parameters = types.ReplyParameters( |
| 6818 | + message_id=self.id |
| 6819 | + ) |
| 6820 | + |
6740 | 6821 | if quote is not None: |
6741 | 6822 | log.warning( |
6742 | 6823 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -7081,6 +7162,11 @@ async def reply_voice( |
7081 | 7162 | Raises: |
7082 | 7163 | RPCError: In case of a Telegram RPC error. |
7083 | 7164 | """ |
| 7165 | + if reply_parameters is None: |
| 7166 | + reply_parameters = types.ReplyParameters( |
| 7167 | + message_id=self.id |
| 7168 | + ) |
| 7169 | + |
7084 | 7170 | if quote is not None: |
7085 | 7171 | log.warning( |
7086 | 7172 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -7356,6 +7442,11 @@ async def reply_paid_media( |
7356 | 7442 | Returns: |
7357 | 7443 | List of :obj:`~pyrogram.types.Message`: On success, a list of messages is returned. |
7358 | 7444 | """ |
| 7445 | + if reply_parameters is None: |
| 7446 | + reply_parameters = types.ReplyParameters( |
| 7447 | + message_id=self.id |
| 7448 | + ) |
| 7449 | + |
7359 | 7450 | if direct_messages_topic_id is None: |
7360 | 7451 | direct_messages_topic_id = self.direct_messages_topic_id |
7361 | 7452 |
|
@@ -7556,6 +7647,11 @@ async def reply_cached_media( |
7556 | 7647 | Raises: |
7557 | 7648 | RPCError: In case of a Telegram RPC error. |
7558 | 7649 | """ |
| 7650 | + if reply_parameters is None: |
| 7651 | + reply_parameters = types.ReplyParameters( |
| 7652 | + message_id=self.id |
| 7653 | + ) |
| 7654 | + |
7559 | 7655 | if quote is not None: |
7560 | 7656 | log.warning( |
7561 | 7657 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -7793,6 +7889,11 @@ async def reply_inline_bot_result( |
7793 | 7889 | Raises: |
7794 | 7890 | RPCError: In case of a Telegram RPC error. |
7795 | 7891 | """ |
| 7892 | + if reply_parameters is None: |
| 7893 | + reply_parameters = types.ReplyParameters( |
| 7894 | + message_id=self.id |
| 7895 | + ) |
| 7896 | + |
7796 | 7897 | if quote is not None: |
7797 | 7898 | log.warning( |
7798 | 7899 | "`quote` parameter is deprecated and will be removed in future updates." |
@@ -7966,6 +8067,11 @@ async def reply_checklist( |
7966 | 8067 | Raises: |
7967 | 8068 | RPCError: In case of a Telegram RPC error. |
7968 | 8069 | """ |
| 8070 | + if reply_parameters is None: |
| 8071 | + reply_parameters = types.ReplyParameters( |
| 8072 | + message_id=self.id |
| 8073 | + ) |
| 8074 | + |
7969 | 8075 | if quote is not None: |
7970 | 8076 | log.warning( |
7971 | 8077 | "`quote` parameter is deprecated and will be removed in future updates." |
|
0 commit comments