IMessagesService Interface

graph TD Type["IMessagesService"] class Type type-node

Syntax

public interface IMessagesService

Methods

Name Value Summary
AddChatUserAsync(int, IInputUser, int, CancellationToken) Task<IUpdates>
Adds a user to a chat and sends a service message on it.
CreateChatAsync(string, IReadOnlyList<IInputUser>, CancellationToken) Task<IUpdates>
Creates a new chat.
DeleteChatUser(int, IInputUser, CancellationToken) Task<IUpdates>
Deletes a user from a chat and sends a service message on it.
DeleteHistoryAsync(IInputPeer, int, bool, CancellationToken) Task<IAffectedHistory>
Deletes communication history.
DeleteMessagesAsync(IReadOnlyList<int>, bool, CancellationToken) Task<IAffectedMessages>
Deletes messages by their IDs.
EditChatPhoto(int, IInputChatPhoto, CancellationToken) Task<IUpdates>
Changes chat photo and sends a service message on it.
EditChatTitle(int, string, CancellationToken) Task<IUpdates>
Chanages chat name and sends a service message on it.
ForwardMessagesAsync(IInputPeer, IInputPeer, IReadOnlyList<int>, bool, bool, CancellationToken) Task<IUpdates>
Forwards messages by their IDs.
GetChatsAsync(IReadOnlyList<int>, CancellationToken) Task<IChats>
Returns chat basic info on their IDs.
GetFullChatAsync(int, CancellationToken) Task<Schema.Messages.IChatFull>
Returns full chat info according to its ID.
GetHistoryAsync(IInputPeer, int, int, int, CancellationToken) Task<IMessages>
Returns messages from the history of a single conversation
GetMessagesAsync(IReadOnlyList<IInputMessage>, CancellationToken) Task<IMessages>
Returns the list of messages by their IDs.
GetUserDialogsAsync(int, CancellationToken) Task<IDialogs>
Returns a list of the current user’s conversations
ReadHistoryAsync(IInputPeer, int, CancellationToken) Task<IAffectedMessages>
Marks message history as read.
ReadMessageContentsAsync(IReadOnlyList<int>, CancellationToken) Task<IAffectedMessages>
Notifies the sender about the recipient having listened a voice message or watched a video.
ReceivedMessagesAsync(int, CancellationToken) Task<IReadOnlyList<IReceivedNotifyMessage>>
Confirms that a client has received messages and cancels push notifications
SendMediaAsync(IInputPeer, IInputMedia, string, CancellationToken) Task<IUpdates>
Sends a non-text message.
SendMessageAsync(IInputPeer, string, CancellationToken) Task<IUpdates>
Sends a text message.
SendTypingAsync(IInputPeer, CancellationToken) Task<bool>
Transmits the current user typing event to the conversation partner or group
SendUploadedDocumentAsync(IInputPeer, IInputFile, string, IReadOnlyList<IDocumentAttribute>, string, IInputFile, CancellationToken) Task<IUpdates>
Sends a document with to user or chat
SendUploadedPhotoAsync(IInputPeer, IInputFile, string, CancellationToken) Task<IUpdates>
Sends a photo to user or chat