Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Feb 27, 2024
1 parent a23e897 commit 93e7881
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
26 changes: 13 additions & 13 deletions telers/src/methods/promote_chat_member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{client::Bot, types::ChatIdKind};
use serde::Serialize;
use serde_with::skip_serializing_none;

/// Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass `false` for all boolean parameters to demote a user.
/// Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass `false` for all boolean parameters to demote a user
/// # Documentation
/// <https://core.telegram.org/bots/api#promotechatmember>
/// # Returns
Expand All @@ -19,31 +19,31 @@ pub struct PromoteChatMember {
pub user_id: i64,
/// Pass `true` if the administrator's presence in the chat is hidden
pub is_anonymous: Option<bool>,
/// Pass `true`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
/// Pass `true` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
pub can_manage_chat: Option<bool>,
/// Pass `true`, if the administrator can create channel posts, channels only
/// Pass `true` if the administrator can post messages in the channel, or access channel statistics; channels only
pub can_post_messages: Option<bool>,
/// Pass `true`, if the administrator can edit messages of other users and can pin messages, channels only
/// Pass `true` if the administrator can edit messages of other users and can pin messages; channels only
pub can_edit_messages: Option<bool>,
/// Pass `true`, if the administrator can delete messages of other users
/// Pass `true` if the administrator can delete messages of other users
pub can_delete_messages: Option<bool>,
/// Pass `true`, if the administrator can manage video chats
/// Pass `true` if the administrator can manage video chats
pub can_manage_voice_chats: Option<bool>,
/// Pass `true`, if the administrator can restrict, ban or unban chat members
/// Pass `true` if the administrator can restrict, ban or unban chat members, or access supergroup statistics
pub can_restrict_members: Option<bool>,
/// Pass `true`, if the administrator can add new administrators with a subset of his own privileges or demote administrators that they has promoted, directly or indirectly (promoted by administrators that were appointed by him)
/// Pass `true` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
pub can_promote_members: Option<bool>,
/// Pass `true`, if the administrator can change the chat title, photo and other settings
/// Pass `true` if the administrator can change chat title, photo and other settings
pub can_change_info: Option<bool>,
/// Pass `true`, if the administrator can invite new users to the chat
/// Pass `true` if the administrator can invite new users to the chat
pub can_invite_users: Option<bool>,
/// Pass `true` if the administrator can pin messages, supergroups only
pub can_pin_messages: Option<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: Option<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: Option<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: Option<bool>,
/// Pass `true` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only
pub can_manage_topics: Option<bool>,
Expand Down
4 changes: 2 additions & 2 deletions telers/src/types/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub struct Supergroup {
pub pinned_message: Option<Message>,
/// Default chat member permissions. Returned only in [`GetChat`](crate::methods::GetChat).
pub permissions: Option<ChatPermissions>,
/// The minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in [`GetChat`](crate::methods::GetChat).
/// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in [`GetChat`](crate::methods::GetChat).
pub slow_mode_delay: Option<i64>,
/// The minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in [`GetChat`](crate::methods::GetChat).
pub unrestrict_boost_count: Option<i64>,
Expand All @@ -143,7 +143,7 @@ pub struct Supergroup {
pub sticker_set_name: Option<Box<str>>,
/// `true`, if the bot can change the group sticker set. Returned only in [`GetChat`](crate::methods::GetChat).
pub can_set_sticker_set: Option<bool>,
/// For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in [`GetChat`](crate::methods::GetChat).
/// The name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in [`GetChat`](crate::methods::GetChat).
pub custom_emoji_sticker_set_name: Option<Box<str>>,
/// Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in [`GetChat`](crate::methods::GetChat).
pub linked_chat_id: Option<i64>,
Expand Down
14 changes: 7 additions & 7 deletions telers/src/types/chat_administrator_rights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ use serde_with::skip_serializing_none;
pub struct ChatAdministratorRights {
/// `true`, if the user's presence in the chat is hidden
pub is_anonymous: bool,
/// `true`, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
/// `true`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.
pub can_manage_chat: bool,
/// `true`, if the administrator can delete messages of other users
pub can_delete_messages: bool,
/// `true`, if the administrator can manage video chats
pub can_manage_video_chats: bool,
/// `true`, if the administrator can restrict, ban or unban chat members
/// `true`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
pub can_restrict_members: bool,
/// `true`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
/// `true`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
pub can_promote_members: bool,
/// `true`, if the user is allowed to change the chat title, photo and other settings
pub can_change_info: bool,
/// `true`, if the user is allowed to invite new users to the chat
pub can_invite_users: bool,
/// `true`, if the administrator can post messages in the channel; channels only
/// `true`, if the administrator can post messages in the channel, or access channel statistics; channels only
pub can_post_messages: Option<bool>,
/// `true`, if the administrator can edit messages of other users and can pin messages; channels only
pub can_edit_messages: Option<bool>,
/// `true`, if the user is allowed to pin messages; groups and 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 forum topics; supergroups only
pub can_manage_topics: Option<bool>,
Expand Down

0 comments on commit 93e7881

Please sign in to comment.