Struct teloxide_core::payloads::BanChatMember
source · pub struct BanChatMember {
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 ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat 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 BanChatMember
impl Clone for BanChatMember
source§impl Debug for BanChatMember
impl Debug for BanChatMember
source§impl Hash for BanChatMember
impl Hash for BanChatMember
source§impl PartialEq<BanChatMember> for BanChatMember
impl PartialEq<BanChatMember> for BanChatMember
source§fn eq(&self, other: &BanChatMember) -> bool
fn eq(&self, other: &BanChatMember) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Payload for BanChatMember
impl Payload for BanChatMember
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 BanChatMember
impl Serialize for BanChatMember
impl Eq for BanChatMember
impl StructuralEq for BanChatMember
impl StructuralPartialEq for BanChatMember
Auto Trait Implementations§
impl RefUnwindSafe for BanChatMember
impl Send for BanChatMember
impl Sync for BanChatMember
impl Unpin for BanChatMember
impl UnwindSafe for BanChatMember
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
key
and return true
if they are equal.