1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Update shipping option

Setting list of ShippingOptions like in payments_example.py
shipping_options = [
    ShippingOption(id='instant', title='WorldWide Teleporter').add_price(LabeledPrice('Teleporter', 1000)),
    ShippingOption(id='pickup', title='Local pickup').add_price(LabeledPrice('Pickup', 300))]
gives us [None,None],so It's better add_price to return self
This commit is contained in:
KanerL 2018-11-12 01:43:00 +02:00 committed by GitHub
parent a946b79839
commit ceea457cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1902,6 +1902,7 @@ class ShippingOption(JsonSerializable):
"""
for price in args:
self.prices.append(price)
return self
def to_json(self):
price_list = []