Class MessageReference
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
表示一个消息引用。
public class MessageReference : IQuote
- Inheritance
-
MessageReference
- Implements
- Inherited Members
Constructors
MessageReference(Guid, Guid?)
使用指定的消息 ID 创建一个新的 MessageReference 实例。
public MessageReference(Guid quotedMessageId = default, Guid? replyMessageId = null)
Parameters
quotedMessageId
Guid要回复的消息的 ID。当此值为
default
时,将不引用回复任何消息。replyMessageId
Guid?要引用的消息的 ID,用于每日消息可发送条数总量消耗折扣,在 MessageReplyDiscountTimeSpan 内回复有效。当此值为
null
时,将使用quotedMessageId
的值;此值为default
时,将不引用任何消息。
Examples
引用回复并自动应用每日消息可发送条数总量消耗的折扣:
new MessageReference(quotedMessageId);
不引用回复但需要应用每日消息可发送条数总量消耗的折扣:
new MessageReference(replyMessageId: replyMessageId);
需要应用每日消息可发送条数总量消耗的折扣,但需要同时回复另一条消息:
new MessageReference(quotedMessageId, replyMessageId);
Properties
Empty
获取一个引用的消息为空的引用。
public static MessageReference Empty { get; }
Property Value
Remarks
此属性用于在修改消息时删除引用。
- See Also
QuotedMessageId
获取此消息引用所引用的消息的 ID。
public Guid QuotedMessageId { get; }
Property Value
ReplyMessageId
获取此消息引用所回复的消息的 ID,用于每日消息可发送条数总量消耗折扣,在 MessageReplyDiscountTimeSpan 内回复有效。
public Guid ReplyMessageId { get; }