mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-13 11:18:17 +01:00
make all methods fields public
This commit is contained in:
parent
0a397d8900
commit
d4c0bc2fe1
69 changed files with 298 additions and 300 deletions
|
@ -19,12 +19,12 @@ use crate::{
|
|||
pub struct AddStickerToSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
user_id: i32,
|
||||
name: String,
|
||||
pub user_id: i32,
|
||||
pub name: String,
|
||||
#[serde(flatten)]
|
||||
sticker_type: StickerType,
|
||||
emojis: String,
|
||||
mask_position: Option<MaskPosition>,
|
||||
pub sticker_type: StickerType,
|
||||
pub emojis: String,
|
||||
pub mask_position: Option<MaskPosition>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -21,11 +21,11 @@ use crate::{
|
|||
pub struct AnswerCallbackQuery {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
callback_query_id: String,
|
||||
text: Option<String>,
|
||||
show_alert: Option<bool>,
|
||||
url: Option<String>,
|
||||
cache_time: Option<i32>,
|
||||
pub callback_query_id: String,
|
||||
pub text: Option<String>,
|
||||
pub show_alert: Option<bool>,
|
||||
pub url: Option<String>,
|
||||
pub cache_time: Option<i32>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -17,13 +17,13 @@ use crate::{
|
|||
pub struct AnswerInlineQuery {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_query_id: String,
|
||||
results: Vec<InlineQueryResult>,
|
||||
cache_time: Option<i32>,
|
||||
is_personal: Option<bool>,
|
||||
next_offset: Option<String>,
|
||||
switch_pm_text: Option<String>,
|
||||
switch_pm_parameter: Option<String>,
|
||||
pub inline_query_id: String,
|
||||
pub results: Vec<InlineQueryResult>,
|
||||
pub cache_time: Option<i32>,
|
||||
pub is_personal: Option<bool>,
|
||||
pub next_offset: Option<String>,
|
||||
pub switch_pm_text: Option<String>,
|
||||
pub switch_pm_parameter: Option<String>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -24,9 +24,9 @@ use crate::{
|
|||
pub struct AnswerPreCheckoutQuery {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
pre_checkout_query_id: String,
|
||||
ok: bool,
|
||||
error_message: Option<String>,
|
||||
pub pre_checkout_query_id: String,
|
||||
pub ok: bool,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -20,10 +20,10 @@ use crate::{
|
|||
pub struct AnswerShippingQuery {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
shipping_query_id: String,
|
||||
ok: bool,
|
||||
shipping_options: Option<Vec<ShippingOption>>,
|
||||
error_message: Option<String>,
|
||||
pub shipping_query_id: String,
|
||||
pub ok: bool,
|
||||
pub shipping_options: Option<Vec<ShippingOption>>,
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -16,14 +16,14 @@ use crate::{
|
|||
pub struct CreateNewStickerSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
user_id: i32,
|
||||
name: String,
|
||||
title: String,
|
||||
pub user_id: i32,
|
||||
pub name: String,
|
||||
pub title: String,
|
||||
#[serde(flatten)]
|
||||
sticker_type: StickerType,
|
||||
emojis: String,
|
||||
contains_masks: Option<bool>,
|
||||
mask_position: Option<MaskPosition>,
|
||||
pub sticker_type: StickerType,
|
||||
pub emojis: String,
|
||||
pub contains_masks: Option<bool>,
|
||||
pub mask_position: Option<MaskPosition>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::{
|
|||
pub struct DeleteChatPhoto {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -22,7 +22,7 @@ use crate::{
|
|||
pub struct DeleteChatStickerSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -27,8 +27,8 @@ use crate::{
|
|||
pub struct DeleteMessage {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::{
|
|||
pub struct DeleteStickerFromSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
sticker: String,
|
||||
pub sticker: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,10 +19,10 @@ use crate::{
|
|||
pub struct EditInlineMessageCaption {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -21,10 +21,10 @@ use crate::{
|
|||
pub struct EditInlineMessageLiveLocation {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
latitude: f32,
|
||||
longitude: f32,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub latitude: f32,
|
||||
pub longitude: f32,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -24,9 +24,9 @@ use crate::{
|
|||
pub struct EditInlineMessageMedia {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
media: InputMedia,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub media: InputMedia,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -20,8 +20,8 @@ use crate::{
|
|||
pub struct EditInlineMessageReplyMarkup {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,11 +19,11 @@ use crate::{
|
|||
pub struct EditInlineMessageText {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
text: String,
|
||||
parse_mode: Option<ParseMode>,
|
||||
disable_web_page_preview: Option<bool>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub text: String,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub disable_web_page_preview: Option<bool>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,11 +19,11 @@ use crate::{
|
|||
pub struct EditMessageCaption {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -21,11 +21,11 @@ use crate::{
|
|||
pub struct EditMessageLiveLocation {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
latitude: f32,
|
||||
longitude: f32,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub latitude: f32,
|
||||
pub longitude: f32,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -22,10 +22,10 @@ use crate::{
|
|||
pub struct EditMessageMedia {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
media: InputMedia,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub media: InputMedia,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,9 +19,9 @@ use crate::{
|
|||
pub struct EditMessageReplyMarkup {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,12 +19,12 @@ use crate::{
|
|||
pub struct EditMessageText {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
text: String,
|
||||
parse_mode: Option<ParseMode>,
|
||||
disable_web_page_preview: Option<bool>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub text: String,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub disable_web_page_preview: Option<bool>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -31,7 +31,7 @@ use crate::{
|
|||
pub struct ExportChatInviteLink {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,10 +15,10 @@ use crate::{
|
|||
pub struct ForwardMessage {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
from_chat_id: ChatId,
|
||||
disable_notification: Option<bool>,
|
||||
message_id: i32,
|
||||
pub chat_id: ChatId,
|
||||
pub from_chat_id: ChatId,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub message_id: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::{
|
|||
pub struct GetChat {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,7 +18,7 @@ use crate::{
|
|||
pub struct GetChatAdministrators {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,8 +15,8 @@ use crate::{
|
|||
pub struct GetChatMember {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::{
|
|||
pub struct GetChatMembersCount {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -31,7 +31,7 @@ use crate::{
|
|||
pub struct GetFile {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
file_id: String,
|
||||
pub file_id: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -24,8 +24,8 @@ pub struct GetGameHighScores {
|
|||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
#[serde(flatten)]
|
||||
target: TargetMessage,
|
||||
user_id: i32,
|
||||
pub target: TargetMessage,
|
||||
pub user_id: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::{
|
|||
pub struct GetStickerSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
name: String,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -22,10 +22,10 @@ use crate::{
|
|||
pub struct GetUpdates {
|
||||
#[serde(skip_serializing)]
|
||||
pub(crate) bot: Bot,
|
||||
pub(crate) offset: Option<i32>,
|
||||
pub(crate) limit: Option<u8>,
|
||||
pub(crate) timeout: Option<u32>,
|
||||
pub(crate) allowed_updates: Option<Vec<AllowedUpdate>>,
|
||||
pub offset: Option<i32>,
|
||||
pub limit: Option<u8>,
|
||||
pub timeout: Option<u32>,
|
||||
pub allowed_updates: Option<Vec<AllowedUpdate>>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,9 +15,9 @@ use crate::{
|
|||
pub struct GetUserProfilePhotos {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
user_id: i32,
|
||||
offset: Option<i32>,
|
||||
limit: Option<i32>,
|
||||
pub user_id: i32,
|
||||
pub offset: Option<i32>,
|
||||
pub limit: Option<i32>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -22,9 +22,9 @@ use crate::{
|
|||
pub struct KickChatMember {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
until_date: Option<i32>,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
pub until_date: Option<i32>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,7 +15,7 @@ use crate::{
|
|||
pub struct LeaveChat {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,9 +19,9 @@ use crate::{
|
|||
pub struct PinChatMessage {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
disable_notification: Option<bool>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub disable_notification: Option<bool>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,16 +19,16 @@ use crate::{
|
|||
pub struct PromoteChatMember {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
can_change_info: Option<bool>,
|
||||
can_post_messages: Option<bool>,
|
||||
can_edit_messages: Option<bool>,
|
||||
can_delete_messages: Option<bool>,
|
||||
can_invite_users: Option<bool>,
|
||||
can_restrict_members: Option<bool>,
|
||||
can_pin_messages: Option<bool>,
|
||||
can_promote_members: Option<bool>,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
pub can_change_info: Option<bool>,
|
||||
pub can_post_messages: Option<bool>,
|
||||
pub can_edit_messages: Option<bool>,
|
||||
pub can_delete_messages: Option<bool>,
|
||||
pub can_invite_users: Option<bool>,
|
||||
pub can_restrict_members: Option<bool>,
|
||||
pub can_pin_messages: Option<bool>,
|
||||
pub can_promote_members: Option<bool>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,10 +19,10 @@ use crate::{
|
|||
pub struct RestrictChatMember {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
permissions: ChatPermissions,
|
||||
until_date: Option<i32>,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
pub permissions: ChatPermissions,
|
||||
pub until_date: Option<i32>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -23,17 +23,17 @@ use crate::{
|
|||
pub struct SendAudio {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
audio: InputFile,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
duration: Option<i32>,
|
||||
performer: Option<String>,
|
||||
title: Option<String>,
|
||||
thumb: Option<InputFile>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub audio: InputFile,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub duration: Option<i32>,
|
||||
pub performer: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub thumb: Option<InputFile>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -29,8 +29,8 @@ use crate::{
|
|||
pub struct SendChatAction {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
action: SendChatActionKind,
|
||||
pub chat_id: ChatId,
|
||||
pub action: SendChatActionKind,
|
||||
}
|
||||
|
||||
/// A type of action used in [`SendChatAction`].
|
||||
|
|
|
@ -15,14 +15,14 @@ use crate::{
|
|||
pub struct SendContact {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
phone_number: String,
|
||||
first_name: String,
|
||||
last_name: Option<String>,
|
||||
vcard: Option<String>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub phone_number: String,
|
||||
pub first_name: String,
|
||||
pub last_name: Option<String>,
|
||||
pub vcard: Option<String>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,13 +15,12 @@ use crate::{
|
|||
pub struct SendDice {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
#[serde(flatten)]
|
||||
emoji: Option<DiceEmoji>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub emoji: Option<DiceEmoji>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,14 +18,14 @@ use crate::{
|
|||
pub struct SendDocument {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
document: InputFile,
|
||||
thumb: Option<InputFile>,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub document: InputFile,
|
||||
pub thumb: Option<InputFile>,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,11 +15,11 @@ use crate::{
|
|||
pub struct SendGame {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: i32,
|
||||
game_short_name: String,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: i32,
|
||||
pub game_short_name: String,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,29 +15,29 @@ use crate::{
|
|||
pub struct SendInvoice {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: i32,
|
||||
title: String,
|
||||
description: String,
|
||||
payload: String,
|
||||
provider_token: String,
|
||||
start_parameter: String,
|
||||
currency: String,
|
||||
prices: Vec<LabeledPrice>,
|
||||
provider_data: Option<String>,
|
||||
photo_url: Option<String>,
|
||||
photo_size: Option<i32>,
|
||||
photo_width: Option<i32>,
|
||||
photo_height: Option<i32>,
|
||||
need_name: Option<bool>,
|
||||
need_phone_number: Option<bool>,
|
||||
need_email: Option<bool>,
|
||||
need_shipping_address: Option<bool>,
|
||||
send_phone_number_to_provider: Option<bool>,
|
||||
send_email_to_provider: Option<bool>,
|
||||
is_flexible: Option<bool>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: i32,
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub payload: String,
|
||||
pub provider_token: String,
|
||||
pub start_parameter: String,
|
||||
pub currency: String,
|
||||
pub prices: Vec<LabeledPrice>,
|
||||
pub provider_data: Option<String>,
|
||||
pub photo_url: Option<String>,
|
||||
pub photo_size: Option<i32>,
|
||||
pub photo_width: Option<i32>,
|
||||
pub photo_height: Option<i32>,
|
||||
pub need_name: Option<bool>,
|
||||
pub need_phone_number: Option<bool>,
|
||||
pub need_email: Option<bool>,
|
||||
pub need_shipping_address: Option<bool>,
|
||||
pub send_phone_number_to_provider: Option<bool>,
|
||||
pub send_email_to_provider: Option<bool>,
|
||||
pub is_flexible: Option<bool>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,13 +15,13 @@ use crate::{
|
|||
pub struct SendLocation {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
latitude: f32,
|
||||
longitude: f32,
|
||||
live_period: Option<i64>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub latitude: f32,
|
||||
pub longitude: f32,
|
||||
pub live_period: Option<i64>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,10 +15,10 @@ use crate::{
|
|||
pub struct SendMediaGroup {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
media: Vec<InputMedia>, // TODO: InputMediaPhoto and InputMediaVideo
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
pub chat_id: ChatId,
|
||||
pub media: Vec<InputMedia>, // TODO: InputMediaPhoto and InputMediaVideo
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,13 +15,13 @@ use crate::{
|
|||
pub struct SendPhoto {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
photo: InputFile,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub photo: InputFile,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,21 +15,21 @@ use crate::{
|
|||
pub struct SendPoll {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
question: String,
|
||||
options: Vec<String>,
|
||||
is_anonymous: Option<bool>,
|
||||
poll_type: Option<PollType>,
|
||||
allows_multiple_answers: Option<bool>,
|
||||
correct_option_id: Option<i32>,
|
||||
explanation: Option<String>,
|
||||
explanation_parse_mode: Option<ParseMode>,
|
||||
open_period: Option<i32>,
|
||||
close_date: Option<i32>,
|
||||
is_closed: Option<bool>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub question: String,
|
||||
pub options: Vec<String>,
|
||||
pub is_anonymous: Option<bool>,
|
||||
pub poll_type: Option<PollType>,
|
||||
pub allows_multiple_answers: Option<bool>,
|
||||
pub correct_option_id: Option<i32>,
|
||||
pub explanation: Option<String>,
|
||||
pub explanation_parse_mode: Option<ParseMode>,
|
||||
pub open_period: Option<i32>,
|
||||
pub close_date: Option<i32>,
|
||||
pub is_closed: Option<bool>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -17,11 +17,11 @@ use crate::{
|
|||
pub struct SendSticker {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
sticker: InputFile,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub sticker: InputFile,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,16 +15,16 @@ use crate::{
|
|||
pub struct SendVenue {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
latitude: f32,
|
||||
longitude: f32,
|
||||
title: String,
|
||||
address: String,
|
||||
foursquare_id: Option<String>,
|
||||
foursquare_type: Option<String>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub latitude: f32,
|
||||
pub longitude: f32,
|
||||
pub title: String,
|
||||
pub address: String,
|
||||
pub foursquare_id: Option<String>,
|
||||
pub foursquare_type: Option<String>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,18 +19,18 @@ use crate::{
|
|||
pub struct SendVideo {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
video: InputFile,
|
||||
duration: Option<i32>,
|
||||
width: Option<i32>,
|
||||
height: Option<i32>,
|
||||
thumb: Option<InputFile>,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
supports_streaming: Option<bool>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub video: InputFile,
|
||||
pub duration: Option<i32>,
|
||||
pub width: Option<i32>,
|
||||
pub height: Option<i32>,
|
||||
pub thumb: Option<InputFile>,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub supports_streaming: Option<bool>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,14 +18,14 @@ use crate::{
|
|||
pub struct SendVideoNote {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
video_note: InputFile,
|
||||
duration: Option<i32>,
|
||||
length: Option<i32>,
|
||||
thumb: Option<InputFile>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub video_note: InputFile,
|
||||
pub duration: Option<i32>,
|
||||
pub length: Option<i32>,
|
||||
pub thumb: Option<InputFile>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -24,14 +24,14 @@ use crate::{
|
|||
pub struct SendVoice {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
voice: InputFile,
|
||||
caption: Option<String>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
duration: Option<i32>,
|
||||
disable_notification: Option<bool>,
|
||||
reply_to_message_id: Option<i32>,
|
||||
reply_markup: Option<ReplyMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub voice: InputFile,
|
||||
pub caption: Option<String>,
|
||||
pub parse_mode: Option<ParseMode>,
|
||||
pub duration: Option<i32>,
|
||||
pub disable_notification: Option<bool>,
|
||||
pub reply_to_message_id: Option<i32>,
|
||||
pub reply_markup: Option<ReplyMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -16,9 +16,9 @@ use crate::{
|
|||
pub struct SetChatAdministratorCustomTitle {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
custom_title: String,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
pub custom_title: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,8 +19,8 @@ use crate::{
|
|||
pub struct SetChatDescription {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
description: Option<String>,
|
||||
pub chat_id: ChatId,
|
||||
pub description: Option<String>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,8 +18,8 @@ use crate::{
|
|||
pub struct SetChatPermissions {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
permissions: ChatPermissions,
|
||||
pub chat_id: ChatId,
|
||||
pub permissions: ChatPermissions,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,8 +18,8 @@ use crate::{
|
|||
pub struct SetChatPhoto {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
photo: InputFile,
|
||||
pub chat_id: ChatId,
|
||||
pub photo: InputFile,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,8 +19,8 @@ use crate::{
|
|||
pub struct SetChatStickerSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
sticker_set_name: String,
|
||||
pub chat_id: ChatId,
|
||||
pub sticker_set_name: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,8 +18,8 @@ use crate::{
|
|||
pub struct SetChatTitle {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
title: String,
|
||||
pub chat_id: ChatId,
|
||||
pub title: String,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -24,11 +24,11 @@ pub struct SetGameScore {
|
|||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
#[serde(flatten)]
|
||||
target: TargetMessage,
|
||||
user_id: i32,
|
||||
score: i32,
|
||||
force: Option<bool>,
|
||||
disable_edit_message: Option<bool>,
|
||||
pub target: TargetMessage,
|
||||
pub user_id: i32,
|
||||
pub score: i32,
|
||||
pub force: Option<bool>,
|
||||
pub disable_edit_message: Option<bool>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,8 +15,7 @@ use crate::{
|
|||
pub struct SetMyCommands {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
|
||||
commands: Vec<BotCommand>,
|
||||
pub commands: Vec<BotCommand>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -16,8 +16,8 @@ use crate::{
|
|||
pub struct SetStickerPositionInSet {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
sticker: String,
|
||||
position: i32,
|
||||
pub sticker: String,
|
||||
pub position: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -16,9 +16,9 @@ use crate::{
|
|||
pub struct SetStickerSetThumb {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
name: String,
|
||||
user_id: i32,
|
||||
thumb: Option<InputFile>,
|
||||
pub name: String,
|
||||
pub user_id: i32,
|
||||
pub thumb: Option<InputFile>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -28,10 +28,10 @@ use crate::{
|
|||
pub struct SetWebhook {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
url: String,
|
||||
certificate: Option<InputFile>,
|
||||
max_connections: Option<i32>,
|
||||
allowed_updates: Option<Vec<AllowedUpdate>>,
|
||||
pub url: String,
|
||||
pub certificate: Option<InputFile>,
|
||||
pub max_connections: Option<i32>,
|
||||
pub allowed_updates: Option<Vec<AllowedUpdate>>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -20,8 +20,8 @@ use crate::{
|
|||
pub struct StopInlineMessageLiveLocation {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
inline_message_id: String,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub inline_message_id: String,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -20,9 +20,9 @@ use crate::{
|
|||
pub struct StopMessageLiveLocation {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -15,9 +15,9 @@ use crate::{
|
|||
pub struct StopPoll {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
message_id: i32,
|
||||
reply_markup: Option<InlineKeyboardMarkup>,
|
||||
pub chat_id: ChatId,
|
||||
pub message_id: i32,
|
||||
pub reply_markup: Option<InlineKeyboardMarkup>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -18,8 +18,8 @@ use crate::{
|
|||
pub struct UnbanChatMember {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
user_id: i32,
|
||||
pub chat_id: ChatId,
|
||||
pub user_id: i32,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -19,7 +19,7 @@ use crate::{
|
|||
pub struct UnpinChatMessage {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
chat_id: ChatId,
|
||||
pub chat_id: ChatId,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
|
|
@ -20,8 +20,8 @@ use crate::{
|
|||
pub struct UploadStickerFile {
|
||||
#[serde(skip_serializing)]
|
||||
bot: Bot,
|
||||
user_id: i32,
|
||||
png_sticker: InputFile,
|
||||
pub user_id: i32,
|
||||
pub png_sticker: InputFile,
|
||||
}
|
||||
#[async_trait::async_trait]
|
||||
impl Request for UploadStickerFile {
|
||||
|
|
Loading…
Add table
Reference in a new issue