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:
parent
a946b79839
commit
ceea457cf1
@ -1902,6 +1902,7 @@ class ShippingOption(JsonSerializable):
|
|||||||
"""
|
"""
|
||||||
for price in args:
|
for price in args:
|
||||||
self.prices.append(price)
|
self.prices.append(price)
|
||||||
|
return self
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
price_list = []
|
price_list = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user