Struct teloxide_core::payloads::RestrictChatMember
source · pub struct RestrictChatMember {
pub chat_id: Recipient,
pub user_id: UserId,
pub permissions: ChatPermissions,
pub until_date: Option<DateTime<Utc>>,
}
Expand description
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
Fields§
§chat_id: Recipient
Unique identifier for the target chat or username of the target channel (in the format @channelusername
)
user_id: UserId
Unique identifier of the target user
permissions: ChatPermissions
A JSON-serialized object for new user permissions
until_date: Option<DateTime<Utc>>
Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
Implementations§
Trait Implementations§
source§impl Clone for RestrictChatMember
impl Clone for RestrictChatMember
source§impl Debug for RestrictChatMember
impl Debug for RestrictChatMember
source§impl Hash for RestrictChatMember
impl Hash for RestrictChatMember
source§impl PartialEq<RestrictChatMember> for RestrictChatMember
impl PartialEq<RestrictChatMember> for RestrictChatMember
source§fn eq(&self, other: &RestrictChatMember) -> bool
fn eq(&self, other: &RestrictChatMember) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Payload for RestrictChatMember
impl Payload for RestrictChatMember
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.source§impl Serialize for RestrictChatMember
impl Serialize for RestrictChatMember
impl Eq for RestrictChatMember
impl StructuralEq for RestrictChatMember
impl StructuralPartialEq for RestrictChatMember
Auto Trait Implementations§
impl RefUnwindSafe for RestrictChatMember
impl Send for RestrictChatMember
impl Sync for RestrictChatMember
impl Unpin for RestrictChatMember
impl UnwindSafe for RestrictChatMember
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.