Class RestrictChatMember

  • All Implemented Interfaces:
    Validable

    public class RestrictChatMember
    extends BotApiMethodBoolean
    Version:
    3.1 Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user. Returns True on success.
    Author:
    Ruben Bermudez
    • Constructor Detail

      • RestrictChatMember

        public RestrictChatMember()
    • 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)