Skip to content

Commit

Permalink
Bot API 6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrat555 committed Sep 23, 2023
1 parent 28cbf96 commit 1874005
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 8 deletions.
12 changes: 12 additions & 0 deletions src/api_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,18 @@ pub struct PromoteChatMemberParams {
#[builder(setter(into, strip_option), default)]
pub can_delete_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_post_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_edit_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_delete_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_manage_video_chats: Option<bool>,
Expand Down
48 changes: 40 additions & 8 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,6 @@ pub struct ChatMemberAdministrator {

pub can_manage_chat: bool,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_post_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_edit_messages: Option<bool>,

pub can_delete_messages: bool,

pub can_manage_video_chats: bool,
Expand All @@ -215,10 +207,30 @@ pub struct ChatMemberAdministrator {

pub can_invite_users: bool,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_post_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_edit_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_pin_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_post_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_edit_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_delete_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_manage_topics: Option<bool>,
Expand Down Expand Up @@ -1250,9 +1262,17 @@ pub struct ChatShared {

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
pub struct WriteAccessAllowed {
#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub from_request: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub web_app_name: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub from_attachment_menu: Option<bool>,
}

#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)]
Expand Down Expand Up @@ -3190,6 +3210,18 @@ pub struct ChatAdministratorRights {
#[builder(setter(into, strip_option), default)]
pub can_pin_messages: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_post_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_edit_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_delete_stories: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub can_manage_topics: Option<bool>,
Expand Down

0 comments on commit 1874005

Please sign in to comment.