lib/tdlib/client_methods.rb
def search_chat_messages(chat_id:, query:, sender_id:, from_message_id:, offset:, limit:, filter:, message_thread_id:)
    broadcast('@type'             => 'searchChatMessages',
              'chat_id'           => chat_id,
              'query'             => query,
              'sender_id'         => sender_id,
              'from_message_id'   => from_message_id,
              'offset'            => offset,
              'limit'             => limit,
              'filter'            => filter,
              'message_thread_id' => message_thread_id)
  end
# Searches for messages with given words in the chat.
# Returns the results in reverse chronological order, i.e.
# in order of decreasing message_id.
# Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an
#   enabled message database.
# For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
#   limit.
#
# @param chat_id [Integer] Identifier of the chat in which to search messages.
# @param query [TD::Types::String] Query to search for.
# @param sender_id [TD::Types::MessageSender] Identifier of the sender of messages to search for; pass null to search
#   for messages from any sender.
#   Not supported in secret chats.
# @param from_message_id [Integer] Identifier of the message starting from which history must be fetched; use 0 to
#   get results from the last message.
# @param offset [Integer] Specify 0 to get results from exactly the from_message_id or a negative offset to get the
#   specified message and some newer messages.
# @param limit [Integer] The maximum number of messages to be returned; must be positive and can't be greater than
#   100.
#   If the offset is negative, 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.
# @param filter [TD::Types::SearchMessagesFilter] Additional filter for messages to search; pass null to search for
#   all messages.
# @param message_thread_id [Integer] If not 0, only messages in the specified thread will be returned; supergroups
#   only.
# @return [TD::Types::Messages]
Searches for messages with given words in the chat.
Returns the results in reverse chronological order, i.e.
in order of decreasing message_id.
Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an
enabled message database.
For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
limit.
Searches for messages with given words in the chat . Returns the results in reverse chronological order i . e . in order of decreasing message_id . Cannot be used in secret chats with a non - empty query ( searchSecretMessages must be used instead ) or without an enabled message database . For optimal performance the number of returned messages is chosen by TDLib and can be smaller than the specified limit .
def search_chat_messages(chat_id:, query:, sender_id:, from_message_id:, offset:, limit:, filter:, message_thread_id:)
    broadcast('@type'             => 'searchChatMessages',
              'chat_id'           => chat_id,
              'query'             => query,
              'sender_id'         => sender_id,
              'from_message_id'   => from_message_id,
              'offset'            => offset,
              'limit'             => limit,
              'filter'            => filter,
              'message_thread_id' => message_thread_id)
  end
def search_chat_messages ( chat_id : , query : , sender_id : , from_message_id : , offset : , limit : , filter : , message_thread_id : ) broadcast ( '@type' => 'searchChatMessages' , 'chat_id' => chat_id , 'query' => query , 'sender_id' => sender_id , 'from_message_id' => from_message_id , 'offset' => offset , 'limit' => limit , 'filter' => filter , 'message_thread_id' => message_thread_id ) end
Searches for messages with given words in the chat.
Searches for messages with given words in the chat .
None
TD::Types::Messages
chat_id
Identifier of the chat in which to search messages.
Identifier of the chat in which to search messages .
query
Query to search for.
Query to search for .
sender_id
Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats.
Identifier of the sender of messages to search for ; pass null to search for messages from any sender . Not supported in secret chats .
from_message_id
Identifier of the message starting from which history must be fetched; use 0 to get results from the last message.
Identifier of the message starting from which history must be fetched ; use 0 to get results from the last message .
offset
Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages.
Specify 0 to get results from exactly the from_message_id or a negative offset 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, 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.
The maximum number of messages to be returned ; must be positive and can ' t be greater than 100 . If the offset is negative 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 .
filter
Additional filter for messages to search; pass null to search for all messages.
Additional filter for messages to search ; pass null to search for all messages .
message_thread_id
If not 0, only messages in the specified thread will be returned; supergroups only.
If not 0 only messages in the specified thread will be returned ; supergroups only .