Class BanChatMember

  • All Implemented Interfaces:
    Validable

    public class BanChatMember
    extends BotApiMethodBoolean
    Version:
    5.3 Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups, 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 group for this to work. Returns True on success.
    Author:
    Ruben Bermudez
    • Constructor Detail

      • BanChatMember

        public BanChatMember()
    • Method Detail

      • setChatId

        public void setChatId​(@NonNull
                              @NonNull Long chatId)
      • setUntilDateInstant

        public void setUntilDateInstant​(Instant instant)
      • setUntilDateDateTime

        public void setUntilDateDateTime​(ZonedDateTime date)
      • forTimePeriodDuration

        public void forTimePeriodDuration​(Duration duration)