@@ -316,6 +316,30 @@ about its business.
316316
317317 Now the method returns the sent message
318318
319+ .. py :method :: send_contact(phone, first_name, [last_name=None , reply_to=None , extra=None , notify=True ])
320+
321+ Send a contact to the user. A Telegram contact is made of its phone
322+ number (with the international prefix), its first name and optionally its
323+ last name. You can use this, for example, to send the user the phone
324+ number of a buisness so he can call them:
325+
326+ .. code-block :: python
327+
328+ @bot.command (" support" )
329+ def support_command (chat , message , args ):
330+ message.sender.send(" Hi there, here is our support number:" )
331+ message.sender.send_contact(" +390124567890" , " Support" )
332+
333+ :param str phone: The phone number of the contact
334+ :param str first_name: The first name of the contact
335+ :param str last_name: The last name of the contact
336+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
337+ :param object extra: An extra reply interface object to attach
338+ :param bool notify: If you want to trigger a notification on the client
339+ :returns: The message you sent
340+ :rtype: ~botogram.Message
341+
342+ .. versionadded :: 0.3
319343
320344.. py :class :: botogram.Chat
321345
@@ -732,6 +756,31 @@ about its business.
732756
733757 Now the method returns the sent message
734758
759+ .. py :method :: send_contact(phone, first_name, [last_name=None , reply_to=None , extra=None , notify=True ])
760+
761+ Send a contact to the chat. A Telegram contact is made of its phone
762+ number (with the international prefix), its first name and optionally its
763+ last name. You can use this, for example, to send the user the phone
764+ number of a buisness so he can call them:
765+
766+ .. code-block :: python
767+
768+ @bot.command (" support" )
769+ def support_command (chat , message , args ):
770+ chat.send(" Hi there, here is our support number:" )
771+ chat.send_contact(" +390124567890" , " Support" )
772+
773+ :param str phone: The phone number of the contact
774+ :param str first_name: The first name of the contact
775+ :param str last_name: The last name of the contact
776+ :param int reply_to: The ID of the :py:class: `~botogram.Message ` this one is replying to
777+ :param object extra: An extra reply interface object to attach
778+ :param bool notify: If you want to trigger a notification on the client
779+ :returns: The message you sent
780+ :rtype: ~botogram.Message
781+
782+ .. versionadded :: 0.3
783+
735784.. py :class :: botogram.ParsedText
736785
737786 This class contains the parsed representation of the text of a received
@@ -1327,6 +1376,30 @@ about its business.
13271376
13281377 Now the method returns the sent message
13291378
1379+ .. py :method :: reply_with_contact(phone, first_name, [last_name=None , extra=None , notify=True ])
1380+
1381+ Reply to this message with a contact. A Telegram contact is made of its
1382+ phone number (with the international prefix), its first name and
1383+ optionally its last name. You can use this, for example, to send the user
1384+ the phone number of a buisness so he can call them:
1385+
1386+ .. code-block :: python
1387+
1388+ @bot.command (" support" )
1389+ def support_command (chat , message , args ):
1390+ message.reply(" Hi there, here is our support number:" )
1391+ message.reply_with_contact(" +390124567890" , " Support" )
1392+
1393+ :param str phone: The phone number of the contact
1394+ :param str first_name: The first name of the contact
1395+ :param str last_name: The last name of the contact
1396+ :param object extra: An extra reply interface object to attach
1397+ :param bool notify: If you want to trigger a notification on the client
1398+ :returns: The message you sent
1399+ :rtype: ~botogram.Message
1400+
1401+ .. versionadded :: 0.3
1402+
13301403
13311404.. py :class :: botogram.Photo
13321405
0 commit comments