Table of Contents

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

Guid

A Guid that represents the chat code of the direct-message channel.

Id

Gets the unique identifier of this direct-message channel.

Guid Id { get; }

Property Value

Guid

A Guid that represents this direct-message channel's unique identifier.

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 RequestOptions

The 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 ICard
quote IQuote
options 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 IQuote
options 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 FileAttachment
quote IQuote
options 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 Stream
filename string
type AttachmentType
quote IQuote
options 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 string
filename string
type AttachmentType
quote IQuote
options 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 string
quote IQuote
options 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.