mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Updated docs for can_post_stories
, can_edit_stories
and can_delete_stories
admin privileges
This commit is contained in:
parent
a8970bb925
commit
9d45244efb
4 changed files with 17 additions and 24 deletions
|
@ -2098,17 +2098,17 @@ Schema(
|
|||
Param(
|
||||
name: "can_post_stories",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can post stories in the channel, channels only")
|
||||
descr: Doc(md: "Pass True, if the administrator can post stories to the chat")
|
||||
),
|
||||
Param(
|
||||
name: "can_edit_stories",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can edit stories posted by other users, channels only")
|
||||
descr: Doc(md: "Pass True, if the administrator can edit stories posted by other users")
|
||||
),
|
||||
Param(
|
||||
name: "can_delete_stories",
|
||||
ty: Option(bool),
|
||||
descr: Doc(md: "Pass True, if the administrator can delete stories posted by other users, channels only")
|
||||
descr: Doc(md: "Pass True, if the administrator can delete stories posted by other users")
|
||||
),
|
||||
Param(
|
||||
name: "can_manage_video_chats",
|
||||
|
|
|
@ -25,11 +25,11 @@ impl_payload! {
|
|||
pub can_edit_messages: bool,
|
||||
/// Pass True, if the administrator can delete messages of other users
|
||||
pub can_delete_messages: bool,
|
||||
/// Pass True, if the administrator can post stories in the channel, channels only
|
||||
/// Pass True, if the administrator can post stories to the chat
|
||||
pub can_post_stories: bool,
|
||||
/// Pass True, if the administrator can edit stories posted by other users, channels only
|
||||
/// Pass True, if the administrator can edit stories posted by other users
|
||||
pub can_edit_stories: bool,
|
||||
/// Pass True, if the administrator can delete stories posted by other users, channels only
|
||||
/// Pass True, if the administrator can delete stories posted by other users
|
||||
pub can_delete_stories: bool,
|
||||
/// Pass True, if the administrator can manage video chats, supergroups only
|
||||
pub can_manage_video_chats: bool,
|
||||
|
|
|
@ -47,16 +47,13 @@ pub struct ChatAdministratorRights {
|
|||
/// supergroups only
|
||||
pub can_pin_messages: Option<bool>,
|
||||
|
||||
/// `true`, if the administrator can post stories in the channel;
|
||||
/// channels only
|
||||
/// `true`, if the administrator can post stories to the chat
|
||||
pub can_post_stories: Option<bool>,
|
||||
|
||||
/// `true`, if the administrator can edit stories posted by other users;
|
||||
/// channels only
|
||||
/// `true`, if the administrator can edit stories posted by other users
|
||||
pub can_edit_stories: Option<bool>,
|
||||
|
||||
/// `true`, if the administrator can delete stories posted by other users;
|
||||
/// channels only
|
||||
/// `true`, if the administrator can delete stories posted by other users
|
||||
pub can_delete_stories: Option<bool>,
|
||||
|
||||
/// `true`, if the user is allowed to create, rename, close, and reopen
|
||||
|
|
|
@ -80,18 +80,15 @@ pub struct Administrator {
|
|||
/// `true` if the administrator can delete messages of other users.
|
||||
pub can_delete_messages: bool,
|
||||
|
||||
/// `true` if the administrator can post stories in the channel, channels
|
||||
/// only.
|
||||
/// `true` if the administrator can post stories to the chat.
|
||||
#[serde(default)]
|
||||
pub can_post_stories: bool,
|
||||
|
||||
/// `true` if the administrator can edit stories posted by other users,
|
||||
/// channels only.
|
||||
/// `true` if the administrator can edit stories posted by other users.
|
||||
#[serde(default)]
|
||||
pub can_edit_stories: bool,
|
||||
|
||||
/// `true` if the administrator can delete stories posted by other users,
|
||||
/// channels only.
|
||||
/// `true` if the administrator can delete stories posted by other users.
|
||||
#[serde(default)]
|
||||
pub can_delete_stories: bool,
|
||||
|
||||
|
@ -447,8 +444,7 @@ impl ChatMemberKind {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the user can post stories in the channel, channels
|
||||
/// only.
|
||||
/// Returns `true` if the administrator can post stories to the chat.
|
||||
///
|
||||
/// I.e. returns `true` if the user
|
||||
/// - is the owner of the chat (even if the chat is not a channel)
|
||||
|
@ -467,8 +463,8 @@ impl ChatMemberKind {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the user can edit stories posted by other users,
|
||||
/// channels only.
|
||||
/// Returns `true` if the administrator can edit stories posted by other
|
||||
/// users.
|
||||
///
|
||||
/// I.e. returns `true` if the user
|
||||
/// - is the owner of the chat (even if the chat is not a channel)
|
||||
|
@ -487,8 +483,8 @@ impl ChatMemberKind {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the user can delete stories posted by other users,
|
||||
/// channels only.
|
||||
/// Returns `true` if the administrator can delete stories posted by other
|
||||
/// users.
|
||||
///
|
||||
/// I.e. returns `true` if the user
|
||||
/// - is the owner of the chat
|
||||
|
|
Loading…
Reference in a new issue