teloxide_core/payloads/send_contact.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 phone contacts. On success, the sent [`Message`] is returned.
11 ///
12 /// [`Message`]: crate::types::Message
13 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
14 pub SendContact (SendContactSetters) => 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 /// Contact's phone number
19 pub phone_number: String [into],
20 /// Contact's first name
21 pub first_name: String [into],
22 }
23 optional {
24 /// Unique identifier of the business connection on behalf of which the message will be sent
25 pub business_connection_id: BusinessConnectionId,
26 /// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
27 pub message_thread_id: ThreadId,
28 /// Contact's last name
29 pub last_name: String [into],
30 /// Additional data about the contact in the form of a [vCard], 0-2048 bytes
31 ///
32 /// [vCard]: https://en.wikipedia.org/wiki/VCard
33 pub vcard: String [into],
34 /// Sends the message [silently]. Users will receive a notification with no sound.
35 ///
36 /// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
37 pub disable_notification: bool,
38 /// Protects the contents of sent messages from forwarding and saving
39 pub protect_content: bool,
40 /// 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
41 pub allow_paid_broadcast: bool,
42 /// Unique identifier of the message effect to be added to the message; for private chats only
43 pub message_effect_id: EffectId,
44 /// Description of the message to reply to
45 pub reply_parameters: ReplyParameters,
46 /// 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.
47 ///
48 /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
49 /// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
50 pub reply_markup: ReplyMarkup [into],
51 }
52 }
53}