- Enclosing class:
- TdApi
Bans a member in a chat; requires canRestrictMembers administrator
right. Members can't be banned in private or secret chats. In
supergroups and channels, the user will not be able to return to the
group on their own using invite links, etc., unless unbanned first.
Returns Ok
-
Field Summary
Modifier and TypeFieldDescriptionint
Point in time (Unix timestamp) when the user will be unbanned; 0 if never.long
Chat identifier.static final int
Identifier uniquely determining type of the object.Member identifier.boolean
Pass true to delete all messages in the chat for the user that is being removed. -
Constructor Summary
ConstructorDescriptionBans a member in a chat; requires canRestrictMembers administrator right.BanChatMember
(long chatId, TdApi.MessageSender memberId, int bannedUntilDate, boolean revokeMessages) Bans a member in a chat; requires canRestrictMembers administrator right.BanChatMember
(DataInput input) Bans a member in a chat; requires canRestrictMembers administrator right. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Function
toString
Methods inherited from class it.tdlight.jni.TdApi.Object
serialize
-
Field Details
-
chatId
public long chatIdChat identifier. -
memberId
Member identifier. -
bannedUntilDate
public int bannedUntilDatePoint in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned. -
revokeMessages
public boolean revokeMessagesPass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
BanChatMember
public BanChatMember()Bans a member in a chat; requires canRestrictMembers administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.Returns
Ok
-
BanChatMember
public BanChatMember(long chatId, TdApi.MessageSender memberId, int bannedUntilDate, boolean revokeMessages) Bans a member in a chat; requires canRestrictMembers administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.Returns
Ok
- Parameters:
chatId
- Chat identifier.memberId
- Member identifier.bannedUntilDate
- Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned.revokeMessages
- Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels.Returns
Ok
-
BanChatMember
Bans a member in a chat; requires canRestrictMembers administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first.Returns
Ok
- Parameters:
input
- Serialized input- Throws:
IOException
- the deserialization failed
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-