Class TdApi.BanChatMember

Enclosing class:
TdApi

public static class TdApi.BanChatMember
extends TdApi.Function
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 Details

    • chatId

      public long chatId
      Chat identifier.
    • userId

      public int userId
      Identifier of the user.
    • 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. 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, int userId, 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.
      userId - int Identifier of the user.
      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. Always true for supergroups and channels.
    • BanChatMember

      public BanChatMember​(DataInput input) throws IOException
      Throws:
      IOException
  • Method Details