All Implemented Interfaces:
Validable

public class BanChatSenderChat extends BotApiMethodBoolean
Version:
5.5 Use this method to ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
Author:
Ruben Bermudez
  • Field Details

  • Constructor Details

    • BanChatSenderChat

      public BanChatSenderChat()
  • Method Details

    • 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)
    • getMethod

      public String getMethod()
      Description copied from class: BotApiMethod
      Getter for method path (that is the same as method name)
      Specified by:
      getMethod in class BotApiMethod<Boolean>
      Returns:
      Method path
    • validate

      public void validate() throws TelegramApiValidationException
      Description copied from interface: Validable
      Validates that mandatory fields are filled and optional objects
      Throws:
      TelegramApiValidationException - If any mandatory field is empty