Skip to content

Commit ba463d5

Browse files
committed
Make tests pass
1 parent 2ee409f commit ba463d5

File tree

1 file changed

+47
-19
lines changed

1 file changed

+47
-19
lines changed

telegram/bot.py

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ def send_message(self,
239239
if disable_web_page_preview:
240240
data['disable_web_page_preview'] = disable_web_page_preview
241241

242-
return self._message(url, data, timeout=timeout, **kwargs)
242+
return self._message(url, data, disable_notification=disable_notification,
243+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
244+
timeout=timeout, **kwargs)
243245

244246
@log
245247
def delete_message(self, chat_id, message_id, timeout=None, **kwargs):
@@ -319,7 +321,8 @@ def forward_message(self,
319321
if message_id:
320322
data['message_id'] = message_id
321323

322-
return self._message(url, data, timeout=timeout, **kwargs)
324+
return self._message(url, data, disable_notification=disable_notification,
325+
timeout=timeout, **kwargs)
323326

324327
@log
325328
def send_photo(self,
@@ -380,7 +383,9 @@ def send_photo(self,
380383
if parse_mode:
381384
data['parse_mode'] = parse_mode
382385

383-
return self._message(url, data, timeout=timeout, **kwargs)
386+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
387+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
388+
**kwargs)
384389

385390
@log
386391
def send_audio(self,
@@ -458,7 +463,9 @@ def send_audio(self,
458463
if parse_mode:
459464
data['parse_mode'] = parse_mode
460465

461-
return self._message(url, data, timeout=timeout, **kwargs)
466+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
467+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
468+
**kwargs)
462469

463470
@log
464471
def send_document(self,
@@ -524,7 +531,9 @@ def send_document(self,
524531
if parse_mode:
525532
data['parse_mode'] = parse_mode
526533

527-
return self._message(url, data, timeout=timeout, **kwargs)
534+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
535+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
536+
**kwargs)
528537

529538
@log
530539
def send_sticker(self,
@@ -573,7 +582,9 @@ def send_sticker(self,
573582

574583
data = {'chat_id': chat_id, 'sticker': sticker}
575584

576-
return self._message(url, data, timeout=timeout, **kwargs)
585+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
586+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
587+
**kwargs)
577588

578589
@log
579590
def send_video(self,
@@ -653,7 +664,9 @@ def send_video(self,
653664
if height:
654665
data['height'] = height
655666

656-
return self._message(url, data, timeout=timeout, **kwargs)
667+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
668+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
669+
**kwargs)
657670

658671
@log
659672
def send_voice(self,
@@ -720,7 +733,9 @@ def send_voice(self,
720733
if parse_mode:
721734
data['parse_mode'] = parse_mode
722735

723-
return self._message(url, data, timeout=timeout, **kwargs)
736+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
737+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
738+
**kwargs)
724739

725740
@log
726741
def send_video_note(self,
@@ -778,7 +793,10 @@ def send_video_note(self,
778793
if length is not None:
779794
data['length'] = length
780795

781-
return self._message(url, data, timeout=timeout, **kwargs)
796+
return self._message(url, data, timeout=timeout,
797+
disable_notification=disable_notification,
798+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
799+
**kwargs)
782800

783801
@log
784802
def send_media_group(self,
@@ -888,7 +906,9 @@ def send_location(self,
888906
if live_period:
889907
data['live_period'] = live_period
890908

891-
return self._message(url, data, timeout=timeout, **kwargs)
909+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
910+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
911+
**kwargs)
892912

893913
@log
894914
def edit_message_live_location(self,
@@ -951,7 +971,7 @@ def edit_message_live_location(self,
951971
if inline_message_id:
952972
data['inline_message_id'] = inline_message_id
953973

954-
return self._message(url, data, timeout=timeout, **kwargs)
974+
return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
955975

956976
@log
957977
def stop_message_live_location(self,
@@ -993,7 +1013,7 @@ def stop_message_live_location(self,
9931013
if inline_message_id:
9941014
data['inline_message_id'] = inline_message_id
9951015

996-
return self._message(url, data, timeout=timeout, **kwargs)
1016+
return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
9971017

9981018
@log
9991019
def send_venue(self,
@@ -1067,7 +1087,9 @@ def send_venue(self,
10671087
if foursquare_id:
10681088
data['foursquare_id'] = foursquare_id
10691089

1070-
return self._message(url, data, timeout=timeout, **kwargs)
1090+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
1091+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
1092+
**kwargs)
10711093

10721094
@log
10731095
def send_contact(self,
@@ -1129,7 +1151,9 @@ def send_contact(self,
11291151
if last_name:
11301152
data['last_name'] = last_name
11311153

1132-
return self._message(url, data, timeout=timeout, **kwargs)
1154+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
1155+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
1156+
**kwargs)
11331157

11341158
@log
11351159
def send_game(self,
@@ -1170,7 +1194,9 @@ def send_game(self,
11701194

11711195
data = {'chat_id': chat_id, 'game_short_name': game_short_name}
11721196

1173-
return self._message(url, data, timeout=timeout, **kwargs)
1197+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
1198+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
1199+
**kwargs)
11741200

11751201
@log
11761202
def send_chat_action(self, chat_id, action, timeout=None, **kwargs):
@@ -1562,7 +1588,7 @@ def edit_message_text(self,
15621588
if disable_web_page_preview:
15631589
data['disable_web_page_preview'] = disable_web_page_preview
15641590

1565-
return self._message(url, data, timeout=timeout, **kwargs)
1591+
return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
15661592

15671593
@log
15681594
def edit_message_caption(self,
@@ -1625,7 +1651,7 @@ def edit_message_caption(self,
16251651
if inline_message_id:
16261652
data['inline_message_id'] = inline_message_id
16271653

1628-
return self._message(url, data, timeout=timeout, **kwargs)
1654+
return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
16291655

16301656
@log
16311657
def edit_message_reply_markup(self,
@@ -1678,7 +1704,7 @@ def edit_message_reply_markup(self,
16781704
if inline_message_id:
16791705
data['inline_message_id'] = inline_message_id
16801706

1681-
return self._message(url, data, timeout=timeout, **kwargs)
1707+
return self._message(url, data, timeout=timeout, reply_markup=reply_markup, **kwargs)
16821708

16831709
@log
16841710
def get_updates(self,
@@ -2327,7 +2353,9 @@ def send_invoice(self,
23272353
if send_email_to_provider is not None:
23282354
data['send_email_to_provider'] = send_email_to_provider
23292355

2330-
return self._message(url, data, timeout=timeout, **kwargs)
2356+
return self._message(url, data, timeout=timeout, disable_notification=disable_notification,
2357+
reply_to_message_id=reply_to_message_id, reply_markup=reply_markup,
2358+
**kwargs)
23312359

23322360
@log
23332361
def answer_shipping_query(self,

0 commit comments

Comments
 (0)