teloxide_core/payloads/send_venue.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6 BusinessConnectionId, EffectId, EphemeralMessageParameters, Message, Recipient, ReplyMarkup,
7 ReplyParameters, SuggestedPostParameters, ThreadId, TopicId,
8};
9
10impl_payload! {
11 /// Use this method to send information about a venue. On success, the sent [`Message`] is returned.
12 ///
13 /// [`Message`]: crate::types::Message
14 #[derive(Debug, PartialEq, Clone, Serialize)]
15 pub SendVenue (SendVenueSetters) => Message {
16 required {
17 /// Latitude of new location
18 pub latitude: f64,
19 /// Longitude of new location
20 pub longitude: f64,
21 /// Name of the venue
22 pub title: String [into],
23 /// Address of the venue
24 pub address: String [into],
25 }
26 optional {
27 /// Unique identifier of the business connection on behalf of which the message will be sent
28 pub business_connection_id: BusinessConnectionId,
29 /// Unique identifier for the target chat or username of the target bot, supergroup, or channel in the format `@username`; required unless the message is sent as an ephemeral reply to a callback query
30 pub chat_id: Recipient [into],
31 /// A JSON-serialized object containing the parameters of the ephemeral message to send
32 pub ephemeral_message_parameters: EphemeralMessageParameters,
33 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
34 pub message_thread_id: ThreadId,
35 /// Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
36 pub direct_messages_topic_id: TopicId,
37 /// Foursquare identifier of the venue
38 pub foursquare_id: String [into],
39 /// Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
40 pub foursquare_type: String [into],
41 /// Google Places identifier of the venue
42 pub google_place_id: String [into],
43 /// Google Places type of the venue. (See [supported types].)
44 ///
45 /// [supported types]: https://developers.google.com/places/web-service/supported_types
46 pub google_place_type: String [into],
47 /// Sends the message [silently]. Users will receive a notification with no sound.
48 ///
49 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
50 pub disable_notification: bool,
51 /// Protects the contents of sent messages from forwarding and saving
52 pub protect_content: bool,
53 /// Pass `true` to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
54 pub allow_paid_broadcast: bool,
55 /// Unique identifier of the message effect to be added to the message; for private chats only
56 pub message_effect_id: EffectId,
57 /// An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
58 pub suggested_post_parameters: SuggestedPostParameters,
59 /// Description of the message to reply to
60 pub reply_parameters: ReplyParameters,
61 /// Additional interface options. A JSON-serialized object for an [inline keyboard], [custom reply keyboard], instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.
62 ///
63 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
64 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
65 pub reply_markup: ReplyMarkup [into],
66 }
67 }
68}