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§
Text
Represents the content of a text message to be sent as the result of an inline query.
Fields
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
Location
Represents the content of a location message to be sent as the result of an inline query.
Fields
live_period: Option<u32>Period in seconds for which the location can be updated, should be between 60 and 86400.
Venue
Represents the content of a venue message to be sent as the result of an inline query.
Fields
foursquare_type: Option<String>Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
google_place_type: Option<String>Google Places type of the venue. (See supported types.)
Contact
Represents the content of a contact message to be sent as the result of an inline query.
Fields
Invoice
Represents the content of an invoice message to be sent as the result of an inline query.
Fields
payload: StringBot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
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.
need_phone_number: Option<bool>Pass True, if you require the user’s phone number 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
disable_notification: Option<bool>Sends the message silently. Users will receive a notification with no sound.
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.
Trait Implementations§
Source§impl Clone for InputMessageContent
impl Clone for InputMessageContent
Source§fn clone(&self) -> InputMessageContent
fn clone(&self) -> InputMessageContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more