Table of Contents

Interface IMessage

Namespace
HeyBox
Assembly
HeyBox.Net.Core.dll

表示一个通用的消息。

public interface IMessage : IEntity<ulong>
Inherited Members

Properties

Author

获取此消息的作者。

IUser Author { get; }

Property Value

IUser

Channel

获取此消息的来源频道。

IMessageChannel Channel { get; }

Property Value

IMessageChannel

CleanContent

获取此消息的纯净内容。

string CleanContent { get; }

Property Value

string

此属性会对 Content 的内容进行两步操作:

  1. 使用 Resolve(TagHandling, TagHandling, TagHandling, TagHandling, TagHandling) 方法解析所有标签的完整名称;
  2. 使用 StripMarkdown(string) 清理所有 Markdown 格式字符。
See Also

Content

获取此消息的内容。

string Content { get; }

Property Value

string

Remarks

如果消息不是文本消息,则此属性可能为空或包含原始代码。

Reference

获取此消息的引用信息。

IMessageReference? Reference { get; }

Property Value

IMessageReference

Source

获取此消息的来源。

MessageSource Source { get; }

Property Value

MessageSource

Tags

获取此消息中解析出的所有标签。

IReadOnlyCollection<ITag> Tags { get; }

Property Value

IReadOnlyCollection<ITag>

Type

获取此消息的类型。

MessageType Type { get; }

Property Value

MessageType

Methods

AddReactionAsync(IEmote, RequestOptions?)

向此消息添加一个回应。

Task AddReactionAsync(IEmote emote, RequestOptions? options = null)

Parameters

emote IEmote

要用于向此消息添加回应的表情符号。

options RequestOptions

发送请求时要使用的选项。

Returns

Task

一个表示添加添加异步操作的任务。

RemoveReactionAsync(IEmote, RequestOptions?)

从此消息中移除一个回应。

Task RemoveReactionAsync(IEmote emote, RequestOptions? options = null)

Parameters

emote IEmote

要从此消息移除的回应的表情符号。

options RequestOptions

发送请求时要使用的选项。

Returns

Task

一个表示异步移除操作的任务。