Module tdlight.api
Package it.tdlight.jni

# Class TdApi.BanChatMember

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Ok>
it.tdlight.jni.TdApi.BanChatMember

Enclosing class:
  TdApi

public static final class TdApi.BanChatMember extends TdApi.Function<TdApi.Ok>
Bans a member in a chat. 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

Fields
Modifier and Type
Field
Description
`int`
`bannedUntilDate`
Point in time (Unix timestamp) when the user will be unbanned; 0 if never.
`long`
`chatId`
Chat identifier.
`static final int`
`CONSTRUCTOR`
`TdApi.MessageSender`
`memberId`
Member identifier.
`boolean`
`revokeMessages`
Pass true to delete all messages in the chat for the user that is being removed.

## Constructor Summary

Constructors
Constructor
Description
`BanChatMember()`
Bans a member in a chat.
`BanChatMember(long chatId, TdApi.MessageSender memberId, int bannedUntilDate, boolean revokeMessages)`
Bans a member in a chat.
`BanChatMember(DataInput input)`
Bans a member in a chat.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Function

`toString`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### chatId

public long chatId
Chat identifier.

### memberId

public TdApi.MessageSender memberId
Member identifier.

### bannedUntilDate

public int 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.

### revokeMessages

public boolean revokeMessages
Pass 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 CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### BanChatMember

public BanChatMember()
Bans a member in a chat. 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. 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` - long Chat identifier.
  `memberId` - MessageSender Member identifier.
  `bannedUntilDate` - int 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.
  `revokeMessages` - boolean Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels.

### BanChatMember

public BanChatMember(DataInput input) throws IOException
Bans a member in a chat. 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`

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`