Documentation - v0.27.1
    Preparing search index...

    Function searchGlobal

    • Search for messages globally from all of your chats

      Note: Due to Telegram limitations, you can only get up to ~10000 messages

      Parameters

      • client: ITelegramClient
      • Optionalparams: {
            filter?: TypeMessagesFilter;
            limit?: number;
            maxDate?: number | Date;
            minDate?: number | Date;
            offset?: SearchGlobalOffset;
            onlyChannels?: boolean;
            query?: string;
        }

        Search parameters

        • Optionalfilter?: TypeMessagesFilter

          Filter the results using some filter. (see SearchFilters)

          SearchFilters.Empty (i.e. will return all messages)

        • Optionallimit?: number

          Limits the number of messages to be retrieved.

          100
          
        • OptionalmaxDate?: number | Date

          Only return messages older than this date

        • OptionalminDate?: number | Date

          Only return messages newer than this date

        • Optionaloffset?: SearchGlobalOffset

          Offset data used for pagination

        • OptionalonlyChannels?: boolean

          Whether to only search across broadcast channels

        • Optionalquery?: string

          Text query string. Use "@" to search for mentions.

          "" (empty string)

      Returns Promise<ArrayPaginated<Message, SearchGlobalOffset>>