Enum telbot_types::query::InputMessageContent [−][src]
pub enum InputMessageContent {
Text {
message_text: String,
parse_mode: Option<ParseMode>,
entities: Option<Vec<MessageEntity>>,
disable_web_page_preview: Option<bool>,
},
Location {
latitude: f32,
longitude: f32,
horizontal_accuracy: f32,
live_period: Option<u32>,
heading: Option<u32>,
proximity_alert_radius: Option<u32>,
},
Venue {
latitude: f32,
longitude: f32,
title: String,
address: String,
foursquare_id: Option<String>,
foursquare_type: Option<String>,
google_place_id: Option<String>,
google_place_type: Option<String>,
},
Contact {
phone_number: String,
first_name: String,
last_name: Option<String>,
vcard: Option<String>,
},
Invoice {Show 25 fields
title: String,
description: String,
payload: String,
provider_token: String,
currency: String,
prices: Vec<LabeledPrice>,
max_tip_amount: Option<i32>,
suggested_tip_amounts: Option<Vec<i32>>,
start_parameter: Option<String>,
provider_data: Option<String>,
photo_url: Option<String>,
photo_size: Option<u32>,
photo_width: Option<u32>,
photo_height: Option<u32>,
need_name: Option<bool>,
need_phone_number: Option<bool>,
need_email: Option<bool>,
need_shipping_address: Option<bool>,
send_phone_number_to_provider: Option<bool>,
send_email_to_provider: Option<bool>,
is_flexible: Option<bool>,
disable_notification: Option<bool>,
reply_to_message_id: Option<i64>,
allow_sending_without_reply: Option<bool>,
reply_markup: Option<InlineKeyboardMarkup>,
},
}Expand description
This object represents the content of a message to be sent as a result of an inline query.
Telegram clients currently support the following 5 types:
Variants
Represents the content of a text message to be sent as the result of an inline query.
Fields of Text
message_text: StringText of the message to be sent, 1-4096 characters
parse_mode: Option<ParseMode>Mode for parsing entities in the message text. See formatting options for more details.
entities: Option<Vec<MessageEntity>>List of special entities that appear in message text, which can be specified instead of parse_mode
disable_web_page_preview: Option<bool>Disables link previews for links in the sent message
Represents the content of a location message to be sent as the result of an inline query.
Fields of Location
latitude: f32Latitude of the location in degrees
longitude: f32Longitude of the location in degrees
horizontal_accuracy: f32The radius of uncertainty for the location, measured in meters; 0-1500
live_period: Option<u32>Period in seconds for which the location can be updated, should be between 60 and 86400.
heading: Option<u32>For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
proximity_alert_radius: Option<u32>For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
Represents the content of a venue message to be sent as the result of an inline query.
Fields of Venue
latitude: f32Latitude of the venue in degrees
longitude: f32Longitude of the venue in degrees
title: StringName of the venue
address: StringAddress of the venue
foursquare_id: Option<String>Foursquare identifier of the venue, if known
foursquare_type: Option<String>Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
google_place_id: Option<String>Google Places identifier of the venue
google_place_type: Option<String>Google Places type of the venue. (See supported types.)
Represents the content of a contact message to be sent as the result of an inline query.
Fields of Contact
Represents the content of an invoice message to be sent as the result of an inline query.
Fields of Invoice
title: StringProduct name, 1-32 characters
description: StringProduct description, 1-255 characters
payload: StringBot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
provider_token: StringPayment provider token, obtained via Botfather
currency: StringThree-letter ISO 4217 currency code, see more on currencies
prices: Vec<LabeledPrice>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
max_tip_amount: Option<i32>The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double).
For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145.
See the exp parameter in currencies.json,
it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
suggested_tip_amounts: Option<Vec<i32>>A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
start_parameter: Option<String>Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter
provider_data: Option<String>A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
photo_url: Option<String>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
photo_size: Option<u32>Photo size
photo_width: Option<u32>Photo width
photo_height: Option<u32>Photo height
need_name: Option<bool>Pass True, if you require the user’s full name to complete the order
need_phone_number: Option<bool>Pass True, if you require the user’s phone number to complete the order
need_email: Option<bool>Pass True, if you require the user’s email address to complete the order
need_shipping_address: Option<bool>Pass True, if you require the user’s shipping address to complete the order
send_phone_number_to_provider: Option<bool>Pass True, if user’s phone number should be sent to provider
send_email_to_provider: Option<bool>Pass True, if user’s email address should be sent to provider
is_flexible: Option<bool>Pass True, if the final price depends on the shipping method
disable_notification: Option<bool>Sends the message silently. Users will receive a notification with no sound.
reply_to_message_id: Option<i64>If the message is a reply, ID of the original message
allow_sending_without_reply: Option<bool>Pass True, if the message should be sent even if the specified replied-to message is not found
reply_markup: Option<InlineKeyboardMarkup>A JSON-serialized object for an inline keyboard.
If empty, one ‘Pay total price’ button will be shown.
If not empty, the first button must be a Pay button.