messages.SearchGlobal
- class pyrogram.raw.functions.messages.SearchGlobal
Search for messages and peers globally
- Details:
Layer:
223ID:
4BC6589A
- Parameters:
q (
str) – Queryfilter (
MessagesFilter) – Global search filtermin_date (
int32-bit) – If a positive value was specified, the method will return only messages with date bigger than min_datemax_date (
int32-bit) – If a positive value was transferred, the method will return only messages with date smaller than max_dateoffset_rate (
int32-bit) – Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message.offset_peer (
InputPeer) – Offsets for pagination, for more info click hereoffset_id (
int32-bit) – Offsets for pagination, for more info click herelimit (
int32-bit) – Offsets for pagination, for more info click herebroadcasts_only (
bool, optional) – If set, only returns results from channels (used in the global channel search tab »).groups_only (
bool, optional) – Whether to search only in groupsusers_only (
bool, optional) – Whether to search only in private chatsfolder_id (
int32-bit, optional) – Peer folder ID, for more info click here
- Returns:
TL Schema
messages.searchGlobal#4bc6589a
flags:#
broadcasts_only:flags.1?true
groups_only:flags.2?true
users_only:flags.3?true
folder_id:flags.0?int
q:string
filter:MessagesFilter
min_date:int
max_date:int
offset_rate:int
offset_peer:InputPeer
offset_id:int
limit:int
= messages.Messages
Parameter Tree
true (optional)true (optional)true (optional)int (optional)stringMessagesFilterInputMessagesFilterEmptyInputMessagesFilterVideoInputMessagesFilterUrlInputMessagesFilterGifInputMessagesFilterVoiceInputMessagesFilterMusictrue (optional)InputMessagesFilterGeointintintInputPeerInputPeerEmptyInputPeerSelfInputPeerChatlongInputPeerUserlonglongInputPeerChannellonglongInputPeerUserFromMessageInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongintintExample
await app.invoke(
SearchGlobal(
broadcasts_only=None,
groups_only=None,
users_only=None,
folder_id=0,
q="text",
filter=InputMessagesFilterEmpty(),
min_date=0,
max_date=0,
offset_rate=0,
offset_peer=await app.resolve_peer(chat_id),
offset_id=0,
limit=0,
)
)