mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Add business_connection_id
to add Send*
methods except SendInvoice
This commit is contained in:
parent
78f909e621
commit
941d1eb82a
18 changed files with 120 additions and 1 deletions
|
@ -224,6 +224,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendmessage",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -520,6 +525,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendphoto",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -605,6 +615,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendaudio",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -705,6 +720,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#senddocument",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -798,6 +818,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendvideo",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -909,6 +934,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendanimation",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1018,6 +1048,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendvoice",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1098,6 +1133,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendvideonote",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1176,6 +1216,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendmediagroup",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1221,6 +1266,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendlocation",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1484,6 +1534,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendvenue",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1578,6 +1633,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendcontact",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1652,6 +1712,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendpoll",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1766,6 +1831,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#senddice",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -1822,6 +1892,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendchataction",
|
||||
tg_category: "Available methods",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the action will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -3637,6 +3712,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendsticker",
|
||||
tg_category: "Stickers",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("Recipient"),
|
||||
|
@ -4393,6 +4473,11 @@ Schema(
|
|||
tg_doc: "https://core.telegram.org/bots/api#sendgame",
|
||||
tg_category: "Games",
|
||||
params: [
|
||||
Param(
|
||||
name: "business_connection_id",
|
||||
ty: Option(String),
|
||||
descr: Doc(md: "Unique identifier of the business connection on behalf of which the message will be sent"),
|
||||
),
|
||||
Param(
|
||||
name: "chat_id",
|
||||
ty: RawTy("ChatId"),
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub animation: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Duration of the animation in seconds
|
||||
|
|
|
@ -25,6 +25,8 @@ impl_payload! {
|
|||
pub audio: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Audio caption, 0-1024 characters after entities parsing
|
||||
|
|
|
@ -30,6 +30,8 @@ impl_payload! {
|
|||
pub action: ChatAction,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the action will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread; supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ impl_payload! {
|
|||
pub first_name: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Contact's last name
|
||||
|
|
|
@ -15,6 +15,8 @@ impl_payload! {
|
|||
pub chat_id: Recipient [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub document: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. [More info on Sending Files »]
|
||||
|
|
|
@ -17,6 +17,8 @@ impl_payload! {
|
|||
pub game_short_name: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
|
|
|
@ -19,6 +19,8 @@ impl_payload! {
|
|||
pub longitude: f64,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// The radius of uncertainty for the location, measured in meters; 0-1500
|
||||
|
|
|
@ -26,6 +26,8 @@ impl_payload! {
|
|||
pub media: Vec<InputMedia> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Sends the message [silently]. Users will receive a notification with no sound.
|
||||
|
|
|
@ -20,6 +20,8 @@ impl_payload! {
|
|||
pub text: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// 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 message text. See [formatting options] for more details.
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub photo: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Photo caption (may also be used when resending photos by _file\_id_), 0-1024 characters after entities parsing
|
||||
|
|
|
@ -22,6 +22,8 @@ impl_payload! {
|
|||
pub options: Vec<String> [collect],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// True, if the poll needs to be anonymous, defaults to True
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::types::{InputFile, Message, Recipient, ReplyMarkup, ReplyParameters,
|
|||
|
||||
impl_payload! {
|
||||
@[multipart = sticker]
|
||||
/// Use this method to send static .WEBP or [animated] .TGS stickers. On success, the sent Message is returned.
|
||||
/// Use this method to send static .WEBP, .TGS or .WEBM stickers. On success, the sent Message is returned.
|
||||
///
|
||||
/// [animated]: https://telegram.org/blog/animated-stickers
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
@ -20,6 +20,8 @@ impl_payload! {
|
|||
pub sticker: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Emoji associated with the sticker; only for just uploaded stickers
|
||||
|
|
|
@ -23,6 +23,8 @@ impl_payload! {
|
|||
pub address: String [into],
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Foursquare identifier of the venue
|
||||
|
|
|
@ -23,6 +23,8 @@ impl_payload! {
|
|||
pub video: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Duration of the video in seconds
|
||||
|
|
|
@ -21,6 +21,8 @@ impl_payload! {
|
|||
pub video_note: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Duration of the video in seconds
|
||||
|
|
|
@ -24,6 +24,8 @@ impl_payload! {
|
|||
pub voice: InputFile,
|
||||
}
|
||||
optional {
|
||||
/// Unique identifier of the business connection on behalf of which the message will be sent
|
||||
pub business_connection_id: String [into],
|
||||
/// Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
||||
pub message_thread_id: ThreadId,
|
||||
/// Voice message caption, 0-1024 characters after entities parsing
|
||||
|
|
Loading…
Reference in a new issue