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: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
user_id: UserIdUnique 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
sourceimpl Clone for KickChatMember
impl Clone for KickChatMember
sourcefn clone(&self) -> KickChatMemberⓘNotable traits for KickChatMemberimpl Payload for KickChatMember type Output = True;
fn clone(&self) -> KickChatMemberⓘNotable traits for KickChatMemberimpl Payload for KickChatMember type Output = True;
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for KickChatMember
impl Debug for KickChatMember
sourceimpl Hash for KickChatMember
impl Hash for KickChatMember
sourceimpl PartialEq<KickChatMember> for KickChatMember
impl PartialEq<KickChatMember> for KickChatMember
sourcefn eq(&self, other: &KickChatMember) -> bool
fn eq(&self, other: &KickChatMember) -> bool
sourceimpl Payload for KickChatMember
impl Payload for KickChatMember
sourcefn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used. Read moresourceimpl Serialize for KickChatMember
impl Serialize for KickChatMember
impl Eq for KickChatMember
impl StructuralEq for KickChatMember
impl StructuralPartialEq for KickChatMember
Auto Trait Implementations
impl RefUnwindSafe for KickChatMember
impl Send for KickChatMember
impl Sync for KickChatMember
impl Unpin for KickChatMember
impl UnwindSafe for KickChatMember
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.