Package org.drinkless.tdlib

# Class TdApi.GetChatMessageCount

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.Count>
org.drinkless.tdlib.TdApi.GetChatMessageCount

Enclosing class:
  TdApi

public static class TdApi.GetChatMessageCount extends TdApi.Function<TdApi.Count>
Returns approximate number of messages of the specified type in the chat.

Returns `Count`

- ## 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
  `long`
  `chatId`
  Identifier of the chat in which to count messages.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `TdApi.SearchMessagesFilter`
  `filter`
  Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
  `boolean`
  `returnLocal`
  Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.
  `long`
  `savedMessagesTopicId`
  If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetChatMessageCount()`
  Default constructor for a function, which returns approximate number of messages of the specified type in the chat.
  `GetChatMessageCount(long chatId, TdApi.SearchMessagesFilter filter, long savedMessagesTopicId, boolean returnLocal)`
  Creates a function, which returns approximate number of messages of the specified type in the chat.

- ## 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

  - ### chatId

    public long chatId
    Identifier of the chat in which to count messages.

  - ### filter

    public TdApi.SearchMessagesFilter filter
    Filter for message content; searchMessagesFilterEmpty is unsupported in this function.

  - ### savedMessagesTopicId

    public long savedMessagesTopicId
    If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages.

  - ### returnLocal

    public boolean returnLocal
    Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### GetChatMessageCount

    public GetChatMessageCount()
    Default constructor for a function, which returns approximate number of messages of the specified type in the chat.

    Returns `Count`

  - ### GetChatMessageCount

    public GetChatMessageCount(long chatId, TdApi.SearchMessagesFilter filter, long savedMessagesTopicId, boolean returnLocal)
    Creates a function, which returns approximate number of messages of the specified type in the chat.

    Returns `Count`

    Parameters:
      `chatId` - Identifier of the chat in which to count messages.
      `filter` - Filter for message content; searchMessagesFilterEmpty is unsupported in this function.
      `savedMessagesTopicId` - If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages.
      `returnLocal` - Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally.

- ## 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.Count>`
    Returns:
      this.CONSTRUCTOR