messages.searchGlobal
在全球范围内搜索消息和对等点
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
broadcasts_only | true | 否 | 如果设置,则仅返回频道的结果(在[全局频道搜索选项卡»](https://core.telegram.org/api/search.md#global-search)中使用)。 |
groups_only | true | 否 | 是否仅分组搜索 |
users_only | true | 否 | 是否只在私人聊天中搜索 |
folder_id | int | 否 | [对等文件夹ID,了解更多信息请点击这里](https://core.telegram.org/api/folders.md#peer-folders) |
community | InputChannel | 否 | TL 类型:输入通道。 |
q | string | 是的 | 查询 |
filter | MessagesFilter | 是的 | 全局搜索过滤器 |
min_date | int | 是的 | 如果指定正值,该方法将仅返回日期大于 min_date 的消息 |
max_date | int | 是的 | 如果传输正值,该方法将仅返回日期小于 max_date 的消息 |
offset_rate | int | 是的 | 初始为 0,然后设置为 messages.messagesSlice](https://core.telegram.org/constructor/messages.messagesSlice.md) 的 [`next_rate` 参数,或者如果不存在,则设置为最后返回消息的 `date`。 |
offset_peer | InputPeer | 是的 | [分页偏移量,更多信息请点击这里](https://core.telegram.org/api/offsets.md) |
offset_id | int | 是的 | [分页偏移量,更多信息请点击这里](https://core.telegram.org/api/offsets.md) |
limit | int | 是的 | [分页偏移量,更多信息请点击这里](https://core.telegram.org/api/offsets.md) |
回应
messages.Messages
MTProto RPC
- 400·FOLDER_ID_INVALID — 无效的文件夹 ID。
- 400 · INPUT_FILTER_INVALID — 指定的过滤器无效。
- 400 · SEARCH_QUERY_EMPTY — 搜索查询为空。