Interface IDMChannel
- Namespace
- HeyBox
- Assembly
- HeyBox.Net.Core.dll
表示一个通用的私聊频道。
public interface IDMChannel : IMessageChannel, IPrivateChannel, IChannel, IEntity<ulong>, IEntity<uint>
- Inherited Members
- Extension Methods
Properties
Id
获取此私聊频道的唯一标识符。
uint Id { get; }
Property Value
Recipient
获取参与到此私聊频道的另外一位用户。
IUser Recipient { get; }
Property Value
Methods
SendCardAsync(ICard, RequestOptions?)
发送卡片消息到此消息频道。
Task<IUserMessage> SendCardAsync(ICard card, RequestOptions? options = null)
Parameters
card
ICard要发送的卡片。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。
SendCardsAsync(IEnumerable<ICard>, RequestOptions?)
发送卡片消息到此消息频道。
Task<IUserMessage> SendCardsAsync(IEnumerable<ICard> cards, RequestOptions? options = null)
Parameters
cards
IEnumerable<ICard>要发送的卡片。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。
SendFileAsync(FileAttachment, RequestOptions?)
发送文件到此消息频道。
Task<IUserMessage> SendFileAsync(FileAttachment attachment, RequestOptions? options = null)
Parameters
attachment
FileAttachment文件的附件信息。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。
SendFileAsync(Stream, string, AttachmentType, Size?, RequestOptions?)
发送文件到此消息频道。
Task<IUserMessage> SendFileAsync(Stream stream, string filename, AttachmentType type = AttachmentType.Image, Size? imageSize = null, RequestOptions? options = null)
Parameters
stream
Stream文件的流。
filename
string文件名。
type
AttachmentType文件的媒体类型。
imageSize
Size?图片文件的图像尺寸。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。
SendFileAsync(string, string?, AttachmentType, Size?, RequestOptions?)
发送文件到此消息频道。
Task<IUserMessage> SendFileAsync(string path, string? filename = null, AttachmentType type = AttachmentType.Image, Size? imageSize = null, RequestOptions? options = null)
Parameters
path
string文件的路径。
filename
string文件名。
type
AttachmentType文件的媒体类型。
imageSize
Size?图片文件的图像尺寸。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。
SendTextAsync(string, IEnumerable<FileAttachment>?, RequestOptions?)
发送文本消息到此私聊消息频道。
Task<IUserMessage> SendTextAsync(string text, IEnumerable<FileAttachment>? imageFileInfos = null, RequestOptions? options = null)
Parameters
text
string要发送的文本。
imageFileInfos
IEnumerable<FileAttachment>图片文件的信息。
options
RequestOptions发送请求时要使用的选项。
Returns
- Task<IUserMessage>
一个表示异步发送操作的任务。任务的结果包含所发送的消息。