mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
fix typo, add bot and kwargs to class init
This commit is contained in:
parent
3767d26fc8
commit
8f2f29c7d4
3 changed files with 10 additions and 4 deletions
|
@ -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}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue