@@ -1835,6 +1835,7 @@ def send_invoice(self,
18351835 photo_height = None ,
18361836 need_name = None ,
18371837 need_phone_number = None ,
1838+ need_email = None
18381839 need_shipping_address = None ,
18391840 is_flexible = None ,
18401841 disable_notification = False ,
@@ -1867,6 +1868,8 @@ def send_invoice(self,
18671868 the order
18681869 need_phone_number (Optional[bool]): Pass True, if you require the user's phone number
18691870 to complete the order
1871+ need_email (Optional[bool]): Pass True, if you require the user's email to
1872+ complete the order
18701873 need_shipping_address (Optional[bool]): Pass True, if you require the user's shipping
18711874 address to complete the order
18721875 is_flexible (Optional[bool]): Pass True, if the final price depends on the shipping
@@ -1915,6 +1918,8 @@ def send_invoice(self,
19151918 data ['need_name' ] = need_name
19161919 if need_phone_number :
19171920 data ['need_phone_number' ] = need_phone_number
1921+ if need_email :
1922+ data ['need_email' ] = need_email
19181923 if need_shipping_address :
19191924 data ['need_shipping_address' ] = need_shipping_address
19201925 if is_flexible :
@@ -2004,7 +2009,8 @@ def answer_pre_checkout_query(self, pre_checkout_query_id, ok,
20042009
20052010 """
20062011
2007- if (ok is not True and error_message is None ) or (ok is True and error_message is not None ):
2012+ if ((ok is not True and error_message is None ) or
2013+ (ok is True and error_message is not None )):
20082014 raise TelegramError (
20092015 'answerPreCheckoutQuery: If ok is True, there should '
20102016 'not be error_message; if ok is False, error_message '
0 commit comments