Package org.drinkless.tdlib

# Class TdApi.SearchSavedMessages

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.FoundChatMessages>
org.drinkless.tdlib.TdApi.SearchSavedMessages

Enclosing class:
  `TdApi`

public static class TdApi.SearchSavedMessages extends TdApi.Function<TdApi.FoundChatMessages>
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

Returns `FoundChatMessages`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `long`
  `fromMessageId`
  Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
  `int`
  `limit`
  The maximum number of messages to be returned; must be positive and can't be greater than 100.
  `int`
  `offset`
  Specify 0 to get results from exactly the message fromMessageId or a negative number to get the specified message and some newer messages.
  `String`
  `query`
  Query to search for.
  `long`
  `savedMessagesTopicId`
  If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
  `TdApi.ReactionType`
  `tag`
  Tag to search for; pass null to return all suitable messages.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SearchSavedMessages()`
  Default constructor for a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.
  `SearchSavedMessages(long savedMessagesTopicId, TdApi.ReactionType tag, String query, long fromMessageId, int offset, int limit)`
  Creates a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

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

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

- ## Field Details

  - ### savedMessagesTopicId

    public long savedMessagesTopicId
    If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.

  - ### tag

    public TdApi.ReactionType tag
    Tag to search for; pass null to return all suitable messages.

  - ### query

    public String query
    Query to search for.

  - ### fromMessageId

    public long fromMessageId
    Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.

  - ### offset

    public int offset
    Specify 0 to get results from exactly the message fromMessageId or a negative number to get the specified message and some newer messages.

  - ### limit

    public int limit
    The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SearchSavedMessages

    public SearchSavedMessages()
    Default constructor for a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

    Returns `FoundChatMessages`

  - ### SearchSavedMessages

    public SearchSavedMessages(long savedMessagesTopicId, TdApi.ReactionType tag, String query, long fromMessageId, int offset, int limit)
    Creates a function, which searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

    Returns `FoundChatMessages`

    Parameters:
      `savedMessagesTopicId` - If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages.
      `tag` - Tag to search for; pass null to return all suitable messages.
      `query` - Query to search for.
      `fromMessageId` - Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message.
      `offset` - Specify 0 to get results from exactly the message fromMessageId or a negative number to get the specified message and some newer messages.
      `limit` - The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, then the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.FoundChatMessages>`
    Returns:
      this.CONSTRUCTOR