LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
10.02k stars 1.41k forks source link

Is there a way to get > 100 results with global search and SearchPostsRequest? #4447

Closed theluxury closed 2 months ago

theluxury commented 2 months ago

Describe your suggested feature

Hi, I'm looking for a way to search globally for > 100 messages. Using SearchPostsRequest I can find the most recent 100 messages containing some hashtag, but I haven't been able to get more results than that. I've tried both offset_rate and offset_id, but neither one seem to work. Is there a way to do this?

Checklist

Lonami commented 2 months ago

I have no plans to make a friendly method for this. But just like GetHistory has to deal with offsets, I'd expect this request to do so, too. See https://core.telegram.org/api/offsets.

If you're using all offsets as intended, and it still doesn't work, there's a chance it just doesn't work on the server.

You could use tdesktop's debugmode to know how they do it.