fix typo, add bot and kwargs to class init

This commit is contained in:
Jeff 2017-05-22 21:32:42 +08:00
parent 3767d26fc8
commit 8f2f29c7d4
3 changed files with 10 additions and 4 deletions

View file

@ -1951,7 +1951,7 @@ class Bot(TelegramObject):
:class:`telegram.TelegramError`
"""
url = '{0]/answerShippingQuery'.format(self.base_url)
url = '{0}/answerShippingQuery'.format(self.base_url)
data = {'shipping_query_id': shipping_query_id, 'ok': ok}
@ -1985,7 +1985,7 @@ class Bot(TelegramObject):
:class:`telegram.TelegramError`
"""
url = '{0]/answerPreCheckoutQuery'.format(self.base_url)
url = '{0}/answerPreCheckoutQuery'.format(self.base_url)
data = {'pre_checkout_query_id': pre_checkout_query_id, 'ok': ok}

View file

@ -47,7 +47,9 @@ class PreCheckoutQuery(TelegramObject):
total_amount,
invoice_payload,
shipping_option_id=None,
order_info=None):
order_info=None,
bot=None,
**kwargs):
self.id = id
self.from_user = from_user
self.currency = currency
@ -56,6 +58,8 @@ class PreCheckoutQuery(TelegramObject):
self.shipping_option_id = shipping_option_id
self.order_info = order_info
self.bot = bot
self._id_attrs = (self.id,)
@staticmethod

View file

@ -35,12 +35,14 @@ class ShippingQuery(TelegramObject):
"""
def __init__(self, id, from_user, invoice_payload, shipping_address):
def __init__(self, id, from_user, invoice_payload, shipping_address, bot=None, **kwargs):
self.id = id
self.from_user = from_user
self.invoice_payload = invoice_payload
self.shipping_address = shipping_address
self.bot = bot
self._id_attrs = (self.id,)
@staticmethod