telegram.inlinequeryresultcontact module

This module contains the classes that represent Telegram InlineQueryResultContact

class telegram.inlinequeryresultcontact.InlineQueryResultContact(id, phone_number, first_name, last_name=None, reply_markup=None, input_message_content=None, thumb_url=None, thumb_width=None, thumb_height=None, **kwargs)

Bases: telegram.inlinequeryresult.InlineQueryResult

Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.

phone_number

str – Contact’s phone number.

first_name

str – Contact’s first name.

last_name

Optional[str] – Contact’s last name.

reply_markup

Optional[telegram.InlineKeyboardMarkup] – Inline keyboard attached to the message.

input_message_content

Optional[telegram.InputMessageContent] – Content of the message to be sent instead of the contact.

thumb_url

Optional[str] – Url of the thumbnail for the result.

thumb_width

Optional[int] – Thumbnail width.

thumb_height

Optional[int] – Thumbnail height.

Parameters:
  • id (str) –
  • phone_number (str) –
  • first_name (str) –
  • last_name (Optional[str]) –
  • reply_markup (Optional[telegram.InlineKeyboardMarkup]) –
  • input_message_content (Optional[telegram.InputMessageContent]) –
  • thumb_url (Optional[str]) – Url of the thumbnail for the result.
  • thumb_width (Optional[int]) –
  • thumb_height (Optional[int]) –
  • **kwargs (dict) – Arbitrary keyword arguments.
static de_json(data, bot)