messages.getSearchCounters
Get the number of results that would be found by a messages.search call with the same parameters
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.messages.getSearchCounters({
peer: new Api.InputPeer({...}),
filters: [new Api.MessagesFilter({...})],
}));
console.log(result); // prints the result
})();
TL schema
---functions---
messages.getSearchCounters#732eef00 peer:InputPeer filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>;
Parameters
Result
Vector[messages.SearchCounter](https://core.telegram.org/type/messages.SearchCounter)
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Gets back found messages
Last updated
Was this helpful?