MessagesSlice

class pyrogram.raw.types.messages.MessagesSlice

Incomplete list of messages and auxiliary data.

Constructor type of Messages.

Details
  • Layer: 122

  • ID: 0x3a54685e

Parameters
  • count (int 32-bit) – Total number of messages in the list.

  • messages (List of Message) – List of messages.

  • chats (List of Chat) – List of chats mentioned in messages.

  • users (List of User) – List of users mentioned in messages and chats.

  • inexact (bool, optional) – If set, indicates that the results may be inexact.

  • next_rate (int 32-bit, optional) – Rate to use in the offset_rate parameter in the next call to messages.searchGlobal.

  • offset_id_offset (int 32-bit, optional) – Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.

Methods

This object can be returned by 11 methods:

messages.GetMessages

Returns the list of messages by their IDs.

messages.GetHistory

Gets back the conversation history with one interlocutor / within a chat.

messages.Search

Gets back found messages.

messages.SearchGlobal

Search for messages and peers globally.

messages.GetUnreadMentions

Get unread messages where we were mentioned.

messages.GetRecentLocations

Get live location history of a certain user.

messages.GetScheduledHistory

Get scheduled messages.

messages.GetScheduledMessages

Get scheduled messages.

messages.GetReplies

Get messages in a reply thread.

channels.GetMessages

Get channel/supergroup messages.

stats.GetMessagePublicForwards

Obtains a list of messages, indicating to which other public channels was a channel message forwarded.