mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +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:
@@ -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 = []
|
||||||
|
|||||||
Reference in New Issue
Block a user