Interface IDMChannel
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
Represents a generic direct-message channel.
public interface IDMChannel : IMessageChannel, IPrivateChannel, IChannel, IEntity<ulong>, IEntity<Guid>
- Inherited Members
- Extension Methods
Properties
ChatCode
Gets the chat code of the direct-message channel.
Guid ChatCode { get; }
Property Value
Id
Gets the unique identifier of this direct-message channel.
Guid Id { get; }
Property Value
Recipient
Gets the recipient of all messages in this channel.
IUser Recipient { get; }
Property Value
- IUser
A user object that represents the other user in this channel.
Methods
CloseAsync(RequestOptions?)
Closes this private channel, removing it from your channel list.
Task CloseAsync(RequestOptions? options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous close operation.
SendCardAsync(ICard, IQuote?, RequestOptions?)
Sends a card message to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendCardAsync(ICard card, IQuote? quote = null, RequestOptions? options = null)
Parameters
card
ICardquote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.
SendCardsAsync(IEnumerable<ICard>, IQuote?, RequestOptions?)
Sends a card message to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendCardsAsync(IEnumerable<ICard> cards, IQuote? quote = null, RequestOptions? options = null)
Parameters
cards
IEnumerable<ICard>quote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.
SendFileAsync(FileAttachment, IQuote?, RequestOptions?)
Sends a file to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendFileAsync(FileAttachment attachment, IQuote? quote = null, RequestOptions? options = null)
Parameters
attachment
FileAttachmentquote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.
SendFileAsync(Stream, string, AttachmentType, IQuote?, RequestOptions?)
Sends a file to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendFileAsync(Stream stream, string filename, AttachmentType type = AttachmentType.File, IQuote? quote = null, RequestOptions? options = null)
Parameters
stream
Streamfilename
stringtype
AttachmentTypequote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.
SendFileAsync(string, string?, AttachmentType, IQuote?, RequestOptions?)
Sends a file to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendFileAsync(string path, string? filename = null, AttachmentType type = AttachmentType.File, IQuote? quote = null, RequestOptions? options = null)
Parameters
path
stringfilename
stringtype
AttachmentTypequote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.
SendTextAsync(string, IQuote?, RequestOptions?)
Sends a text message to this message channel.
Task<Cacheable<IUserMessage, Guid>> SendTextAsync(string text, IQuote? quote = null, RequestOptions? options = null)
Parameters
text
stringquote
IQuoteoptions
RequestOptions
Returns
- Task<Cacheable<IUserMessage, Guid>>
A task that represents an asynchronous send operation for delivering the message. The task result contains the identifier and timestamp of the sent message.