X Tutup
Skip to content

Commit 8f2f29c

Browse files
committed
fix typo, add bot and kwargs to class init
1 parent 3767d26 commit 8f2f29c

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

telegram/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,7 @@ def answer_shipping_query(self,
19511951
:class:`telegram.TelegramError`
19521952
19531953
"""
1954-
url = '{0]/answerShippingQuery'.format(self.base_url)
1954+
url = '{0}/answerShippingQuery'.format(self.base_url)
19551955

19561956
data = {'shipping_query_id': shipping_query_id, 'ok': ok}
19571957

@@ -1985,7 +1985,7 @@ def answer_pre_checkout_query(self, pre_checkout_query_id, ok, error_message=Non
19851985
:class:`telegram.TelegramError`
19861986
19871987
"""
1988-
url = '{0]/answerPreCheckoutQuery'.format(self.base_url)
1988+
url = '{0}/answerPreCheckoutQuery'.format(self.base_url)
19891989

19901990
data = {'pre_checkout_query_id': pre_checkout_query_id, 'ok': ok}
19911991

telegram/precheckoutquery.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def __init__(self,
4747
total_amount,
4848
invoice_payload,
4949
shipping_option_id=None,
50-
order_info=None):
50+
order_info=None,
51+
bot=None,
52+
**kwargs):
5153
self.id = id
5254
self.from_user = from_user
5355
self.currency = currency
@@ -56,6 +58,8 @@ def __init__(self,
5658
self.shipping_option_id = shipping_option_id
5759
self.order_info = order_info
5860

61+
self.bot = bot
62+
5963
self._id_attrs = (self.id,)
6064

6165
@staticmethod

telegram/shippingquery.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ class ShippingQuery(TelegramObject):
3535
3636
"""
3737

38-
def __init__(self, id, from_user, invoice_payload, shipping_address):
38+
def __init__(self, id, from_user, invoice_payload, shipping_address, bot=None, **kwargs):
3939
self.id = id
4040
self.from_user = from_user
4141
self.invoice_payload = invoice_payload
4242
self.shipping_address = shipping_address
4343

44+
self.bot = bot
45+
4446
self._id_attrs = (self.id,)
4547

4648
@staticmethod

0 commit comments

Comments
 (0)
X Tutup