Skip to content

Commit 9d17b68

Browse files
committed
refactor(message): remove automatic reply_parameters initialization
1 parent 362d44b commit 9d17b68

File tree

1 file changed

+0
-106
lines changed

1 file changed

+0
-106
lines changed

pyrogram/types/messages_and_media/message.py

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
log = logging.getLogger(__name__)
3535

36-
3736
class Str(str):
3837
def __init__(self, *args):
3938
super().__init__()
@@ -2108,11 +2107,6 @@ async def reply_animation(
21082107
Raises:
21092108
RPCError: In case of a Telegram RPC error.
21102109
"""
2111-
if reply_parameters is None:
2112-
reply_parameters = types.ReplyParameters(
2113-
message_id=self.id
2114-
)
2115-
21162110
if quote is not None:
21172111
log.warning(
21182112
"`quote` parameter is deprecated and will be removed in future updates."
@@ -2490,11 +2484,6 @@ async def reply_audio(
24902484
Raises:
24912485
RPCError: In case of a Telegram RPC error.
24922486
"""
2493-
if reply_parameters is None:
2494-
reply_parameters = types.ReplyParameters(
2495-
message_id=self.id
2496-
)
2497-
24982487
if quote is not None:
24992488
log.warning(
25002489
"`quote` parameter is deprecated and will be removed in future updates."
@@ -2800,11 +2789,6 @@ async def reply_contact(
28002789
Raises:
28012790
RPCError: In case of a Telegram RPC error.
28022791
"""
2803-
if reply_parameters is None:
2804-
reply_parameters = types.ReplyParameters(
2805-
message_id=self.id
2806-
)
2807-
28082792
if quote is not None:
28092793
log.warning(
28102794
"`quote` parameter is deprecated and will be removed in future updates."
@@ -3095,11 +3079,6 @@ async def reply_document(
30953079
Raises:
30963080
RPCError: In case of a Telegram RPC error.
30973081
"""
3098-
if reply_parameters is None:
3099-
reply_parameters = types.ReplyParameters(
3100-
message_id=self.id
3101-
)
3102-
31033082
if quote is not None:
31043083
log.warning(
31053084
"`quote` parameter is deprecated and will be removed in future updates."
@@ -3387,11 +3366,6 @@ async def reply_game(
33873366
Raises:
33883367
RPCError: In case of a Telegram RPC error.
33893368
"""
3390-
if reply_parameters is None:
3391-
reply_parameters = types.ReplyParameters(
3392-
message_id=self.id
3393-
)
3394-
33953369
if quote is not None:
33963370
log.warning(
33973371
"`quote` parameter is deprecated and will be removed in future updates."
@@ -3658,11 +3632,6 @@ async def reply_invoice(
36583632
Returns:
36593633
:obj:`~pyrogram.types.Message`: On success, the sent invoice message is returned.
36603634
"""
3661-
if reply_parameters is None:
3662-
reply_parameters = types.ReplyParameters(
3663-
message_id=self.id
3664-
)
3665-
36663635
if message_thread_id is None:
36673636
message_thread_id = self.message_thread_id
36683637

@@ -4013,11 +3982,6 @@ async def reply_location(
40133982
Raises:
40143983
RPCError: In case of a Telegram RPC error.
40153984
"""
4016-
if reply_parameters is None:
4017-
reply_parameters = types.ReplyParameters(
4018-
message_id=self.id
4019-
)
4020-
40213985
if quote is not None:
40223986
log.warning(
40233987
"`quote` parameter is deprecated and will be removed in future updates."
@@ -4239,11 +4203,6 @@ async def reply_media_group(
42394203
Raises:
42404204
RPCError: In case of a Telegram RPC error.
42414205
"""
4242-
if reply_parameters is None:
4243-
reply_parameters = types.ReplyParameters(
4244-
message_id=self.id
4245-
)
4246-
42474206
if quote is not None:
42484207
log.warning(
42494208
"`quote` parameter is deprecated and will be removed in future updates."
@@ -4463,11 +4422,6 @@ async def reply(
44634422
Raises:
44644423
RPCError: In case of a Telegram RPC error.
44654424
"""
4466-
if reply_parameters is None:
4467-
reply_parameters = types.ReplyParameters(
4468-
message_id=self.id
4469-
)
4470-
44714425
if quote is not None:
44724426
log.warning(
44734427
"`quote` parameter is deprecated and will be removed in future updates."
@@ -4792,11 +4746,6 @@ async def reply_photo(
47924746
Raises:
47934747
RPCError: In case of a Telegram RPC error.
47944748
"""
4795-
if reply_parameters is None:
4796-
reply_parameters = types.ReplyParameters(
4797-
message_id=self.id
4798-
)
4799-
48004749
if quote is not None:
48014750
log.warning(
48024751
"`quote` parameter is deprecated and will be removed in future updates."
@@ -5177,11 +5126,6 @@ async def reply_poll(
51775126
Raises:
51785127
RPCError: In case of a Telegram RPC error.
51795128
"""
5180-
if reply_parameters is None:
5181-
reply_parameters = types.ReplyParameters(
5182-
message_id=self.id
5183-
)
5184-
51855129
if quote is not None:
51865130
log.warning(
51875131
"`quote` parameter is deprecated and will be removed in future updates."
@@ -5493,11 +5437,6 @@ async def reply_dice(
54935437
Returns:
54945438
:obj:`~pyrogram.types.Message`: On success, the sent dice message is returned.
54955439
"""
5496-
if reply_parameters is None:
5497-
reply_parameters = types.ReplyParameters(
5498-
message_id=self.id
5499-
)
5500-
55015440
if message_thread_id is None:
55025441
message_thread_id = self.message_thread_id
55035442

@@ -5751,11 +5690,6 @@ async def reply_sticker(
57515690
Raises:
57525691
RPCError: In case of a Telegram RPC error.
57535692
"""
5754-
if reply_parameters is None:
5755-
reply_parameters = types.ReplyParameters(
5756-
message_id=self.id
5757-
)
5758-
57595693
if quote is not None:
57605694
log.warning(
57615695
"`quote` parameter is deprecated and will be removed in future updates."
@@ -6049,11 +5983,6 @@ async def reply_venue(
60495983
Raises:
60505984
RPCError: In case of a Telegram RPC error.
60515985
"""
6052-
if reply_parameters is None:
6053-
reply_parameters = types.ReplyParameters(
6054-
message_id=self.id
6055-
)
6056-
60575986
if quote is not None:
60585987
log.warning(
60595988
"`quote` parameter is deprecated and will be removed in future updates."
@@ -6394,11 +6323,6 @@ async def reply_video(
63946323
Raises:
63956324
RPCError: In case of a Telegram RPC error.
63966325
"""
6397-
if reply_parameters is None:
6398-
reply_parameters = types.ReplyParameters(
6399-
message_id=self.id
6400-
)
6401-
64026326
if quote is not None:
64036327
log.warning(
64046328
"`quote` parameter is deprecated and will be removed in future updates."
@@ -6813,11 +6737,6 @@ async def reply_video_note(
68136737
Raises:
68146738
RPCError: In case of a Telegram RPC error.
68156739
"""
6816-
if reply_parameters is None:
6817-
reply_parameters = types.ReplyParameters(
6818-
message_id=self.id
6819-
)
6820-
68216740
if quote is not None:
68226741
log.warning(
68236742
"`quote` parameter is deprecated and will be removed in future updates."
@@ -7162,11 +7081,6 @@ async def reply_voice(
71627081
Raises:
71637082
RPCError: In case of a Telegram RPC error.
71647083
"""
7165-
if reply_parameters is None:
7166-
reply_parameters = types.ReplyParameters(
7167-
message_id=self.id
7168-
)
7169-
71707084
if quote is not None:
71717085
log.warning(
71727086
"`quote` parameter is deprecated and will be removed in future updates."
@@ -7442,11 +7356,6 @@ async def reply_paid_media(
74427356
Returns:
74437357
List of :obj:`~pyrogram.types.Message`: On success, a list of messages is returned.
74447358
"""
7445-
if reply_parameters is None:
7446-
reply_parameters = types.ReplyParameters(
7447-
message_id=self.id
7448-
)
7449-
74507359
if direct_messages_topic_id is None:
74517360
direct_messages_topic_id = self.direct_messages_topic_id
74527361

@@ -7647,11 +7556,6 @@ async def reply_cached_media(
76477556
Raises:
76487557
RPCError: In case of a Telegram RPC error.
76497558
"""
7650-
if reply_parameters is None:
7651-
reply_parameters = types.ReplyParameters(
7652-
message_id=self.id
7653-
)
7654-
76557559
if quote is not None:
76567560
log.warning(
76577561
"`quote` parameter is deprecated and will be removed in future updates."
@@ -7889,11 +7793,6 @@ async def reply_inline_bot_result(
78897793
Raises:
78907794
RPCError: In case of a Telegram RPC error.
78917795
"""
7892-
if reply_parameters is None:
7893-
reply_parameters = types.ReplyParameters(
7894-
message_id=self.id
7895-
)
7896-
78977796
if quote is not None:
78987797
log.warning(
78997798
"`quote` parameter is deprecated and will be removed in future updates."
@@ -8067,11 +7966,6 @@ async def reply_checklist(
80677966
Raises:
80687967
RPCError: In case of a Telegram RPC error.
80697968
"""
8070-
if reply_parameters is None:
8071-
reply_parameters = types.ReplyParameters(
8072-
message_id=self.id
8073-
)
8074-
80757969
if quote is not None:
80767970
log.warning(
80777971
"`quote` parameter is deprecated and will be removed in future updates."

0 commit comments

Comments
 (0)