From ceea457cf1202b74aa4411ecdb320a7e74c105b0 Mon Sep 17 00:00:00 2001 From: KanerL <40599431+KanerL@users.noreply.github.com> Date: Mon, 12 Nov 2018 01:43:00 +0200 Subject: [PATCH] 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 --- telebot/types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/telebot/types.py b/telebot/types.py index 6165c94..1497657 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -1902,6 +1902,7 @@ class ShippingOption(JsonSerializable): """ for price in args: self.prices.append(price) + return self def to_json(self): price_list = []