Add question_parse_mode and question_entities params

to `sendPoll` method
This commit is contained in:
Andrey Brusnik 2024-08-19 01:25:32 +04:00
parent daee7e99c1
commit f6c54d3363
No known key found for this signature in database
GPG key ID: D33232F28CFF442C
2 changed files with 19 additions and 0 deletions

View file

@ -1737,6 +1737,19 @@ Schema(
ty: String,
descr: Doc(md: "Poll question, 1-300 characters"),
),
Param(
name: "question_parse_mode",
ty: Option(RawTy("ParseMode")),
descr: Doc(
md: "Mode for parsing entities in the question. See [formatting options] for more details. Currently, only custom emoji entities are allowed",
md_links: {"formatting options": "https://core.telegram.org/bots/api#formatting-options"}
)
),
Param(
name: "question_entities",
ty: Option(ArrayOf(RawTy("MessageEntity"))),
descr: Doc(md: "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of _question\\_parse\\_mode_"),
),
Param(
name: "options",
ty: ArrayOf(String),

View file

@ -27,6 +27,12 @@ impl_payload! {
pub business_connection_id: BusinessConnectionId,
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
pub message_thread_id: ThreadId,
/// Mode for parsing entities in the question. See [formatting options] for more details. Currently, only custom emoji entities are allowed
///
/// [formatting options]: https://core.telegram.org/bots/api#formatting-options
pub question_parse_mode: ParseMode,
/// A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of _question\_parse\_mode_
pub question_entities: Vec<MessageEntity> [collect],
/// True, if the poll needs to be anonymous, defaults to True
pub is_anonymous: bool,
/// Poll type, “quiz” or “regular”, defaults to “regular”