mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add InputPollOption
struct
This commit is contained in:
parent
f6c54d3363
commit
477fd49faa
2 changed files with 26 additions and 0 deletions
|
@ -88,6 +88,7 @@ pub use inline_query_results_button::*;
|
|||
pub use input_file::*;
|
||||
pub use input_media::*;
|
||||
pub use input_message_content::*;
|
||||
pub use input_poll_option::*;
|
||||
pub use input_sticker::*;
|
||||
pub use invoice::*;
|
||||
pub use keyboard_button::*;
|
||||
|
@ -227,6 +228,7 @@ mod inline_query_results_button;
|
|||
mod input_file;
|
||||
mod input_media;
|
||||
mod input_message_content;
|
||||
mod input_poll_option;
|
||||
mod input_sticker;
|
||||
mod invoice;
|
||||
mod keyboard_button;
|
||||
|
|
24
crates/teloxide-core/src/types/input_poll_option.rs
Normal file
24
crates/teloxide-core/src/types/input_poll_option.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::{MessageEntity, ParseMode};
|
||||
|
||||
/// This object contains information about one answer option in a poll to send.
|
||||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#inputpolloption).
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(PartialEq, Eq, Hash)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct InputPollOption {
|
||||
/// Option text, 1-100 characters.
|
||||
pub text: String,
|
||||
|
||||
/// Mode for parsing entities in the text. See [formatting options] for more
|
||||
/// details. Currently, only custom emoji entities are allowed.
|
||||
///
|
||||
/// [formatting options]: https://core.telegram.org/bots/api#formatting-options
|
||||
pub text_parse_mode: Option<ParseMode>,
|
||||
|
||||
/// A JSON-serialized list of special entities that appear in the poll
|
||||
/// option text. It can be specified instead of _text\_parse\_mode_.
|
||||
pub text_entities: Option<Vec<MessageEntity>>,
|
||||
}
|
Loading…
Add table
Reference in a new issue