2021-02-16 14:55:27 +01:00
// This file is auto generated by `cg` <https://github.com/teloxide/cg> (8ee7ef2).
2020-11-11 20:41:44 +01:00
// **DO NOT EDIT THIS FILE**,
// edit `cg` instead.
use serde ::Serialize ;
2020-09-28 23:45:04 +02:00
2020-10-23 20:32:57 +02:00
use crate ::types ::{ ChatId , Message , ParseMode , ReplyMarkup } ;
2020-09-28 23:45:04 +02:00
2020-10-23 20:32:57 +02:00
impl_payload! {
2020-11-11 20:41:44 +01:00
/// Use this method to send text messages. On success, the sent [`Message`] is returned.
2020-09-28 23:45:04 +02:00
///
2020-10-23 20:32:57 +02:00
/// [`Message`]: crate::types::Message
2020-11-11 20:41:44 +01:00
#[ derive(Debug, PartialEq, Eq, Hash, Clone, Serialize) ]
2020-10-23 20:32:57 +02:00
pub SendMessage ( SendMessageSetters ) = > Message {
required {
2020-11-11 20:41:44 +01:00
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
2020-10-23 20:32:57 +02:00
pub chat_id : ChatId [ into ] ,
2020-11-11 20:41:44 +01:00
/// Text of the message to be sent, 1-4096 characters after entities parsing
2020-10-23 20:32:57 +02:00
pub text : String [ into ] ,
}
optional {
2020-11-11 20:41:44 +01:00
/// Mode for parsing entities in the message text. See [formatting options] for more details.
2020-10-23 20:32:57 +02:00
///
2020-11-11 20:41:44 +01:00
/// [formatting options]: https://core.telegram.org/bots/api#formatting-options
2020-10-23 20:32:57 +02:00
pub parse_mode : ParseMode ,
/// Disables link previews for links in this message
pub disable_web_page_preview : bool ,
2020-11-11 20:41:44 +01:00
/// Sends the message [silently]. Users will receive a notification with no sound.
///
/// [silently]: https://telegram.org/blog/channels-2-0#silent-messages
2020-10-23 20:32:57 +02:00
pub disable_notification : bool ,
2020-11-11 20:41:44 +01:00
/// If the message is a reply, ID of the original message
2020-11-16 10:58:55 +01:00
pub reply_to_message_id : i32 ,
2020-11-11 20:41:44 +01:00
/// Additional interface options. A JSON-serialized object for an [inline keyboard], [custom reply keyboard], instructions to remove reply keyboard or to force a reply from the user.
2020-10-23 20:32:57 +02:00
///
2020-12-28 12:30:18 +01:00
/// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
2021-01-07 22:44:19 +01:00
/// [custom reply keyboard]: https://core.telegram.org/bots#keyboards
2020-11-11 20:41:44 +01:00
pub reply_markup : ReplyMarkup [ into ] ,
2020-09-28 23:45:04 +02:00
}
}
}