Struct teloxide_core::payloads::KickChatMember
source · pub struct KickChatMember {
pub chat_id: Recipient,
pub user_id: UserId,
pub until_date: Option<DateTime<Utc>>,
pub revoke_messages: Option<bool>,
}
Expand description
Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 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
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
revoke_messages: Option<bool>
Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.
Implementations§
Trait Implementations§
source§impl Clone for KickChatMember
impl Clone for KickChatMember
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KickChatMember
impl Debug for KickChatMember
source§impl Hash for KickChatMember
impl Hash for KickChatMember
source§impl PartialEq for KickChatMember
impl PartialEq for KickChatMember
source§impl Payload for KickChatMember
impl Payload for KickChatMember
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates
with
big timeout
), the minimum timeout that should be used.source§impl Serialize for KickChatMember
impl Serialize for KickChatMember
impl Eq for KickChatMember
impl StructuralPartialEq for KickChatMember
Auto Trait Implementations§
impl Freeze for KickChatMember
impl RefUnwindSafe for KickChatMember
impl Send for KickChatMember
impl Sync for KickChatMember
impl Unpin for KickChatMember
impl UnwindSafe for KickChatMember
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Erasable for T
impl<T> Erasable for T
source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<P> KickChatMemberSetters for Pwhere
P: HasPayload<Payload = KickChatMember>,
impl<P> KickChatMemberSetters for Pwhere
P: HasPayload<Payload = KickChatMember>,
source§fn until_date<T>(self, value: T) -> Self
fn until_date<T>(self, value: T) -> Self
until_date
field.source§fn revoke_messages(self, value: bool) -> Self
fn revoke_messages(self, value: bool) -> Self
revoke_messages
field.