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, Message, Recipient, ReplyMarkup, ReplyParameters, ThreadId,
7};
8
9impl_payload! {
10 /// Use this method to send information about a venue. On success, the sent [`Message`] is returned.
11 ///
12 /// [`Message`]: crate::types::Message
13 #[derive(Debug, PartialEq, Clone, Serialize)]
14 pub SendVenue (SendVenueSetters) => Message {
15 required {
16 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
17 pub chat_id: Recipient [into],
18 /// Latitude of new location
19 pub latitude: f64,
20 /// Longitude of new location
21 pub longitude: f64,
22 /// Name of the venue
23 pub title: String [into],
24 /// Address of the venue
25 pub address: String [into],
26 }
27 optional {
28 /// Unique identifier of the business connection on behalf of which the message will be sent
29 pub business_connection_id: BusinessConnectionId,
30 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
31 pub message_thread_id: ThreadId,
32 /// Foursquare identifier of the venue
33 pub foursquare_id: String [into],
34 /// Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
35 pub foursquare_type: String [into],
36 /// Google Places identifier of the venue
37 pub google_place_id: String [into],
38 /// Google Places type of the venue. (See [supported types].)
39 ///
40 /// [supported types]: https://developers.google.com/places/web-service/supported_types
41 pub google_place_type: String [into],
42 /// Sends the message [silently]. Users will receive a notification with no sound.
43 ///
44 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
45 pub disable_notification: bool,
46 /// Protects the contents of sent messages from forwarding and saving
47 pub protect_content: bool,
48 /// 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
49 pub allow_paid_broadcast: bool,
50 /// Unique identifier of the message effect to be added to the message; for private chats only
51 pub message_effect_id: EffectId,
52 /// Description of the message to reply to
53 pub reply_parameters: ReplyParameters,
54 /// 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.
55 ///
56 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
57 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
58 pub reply_markup: ReplyMarkup [into],
59 }
60 }
61}