Class PlainTextElement
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
纯文本元素,可用于 IModule 中。
public class PlainTextElement : IElement, IEquatable<PlainTextElement>, IEquatable<IElement>
- Inheritance
-
PlainTextElement
- Implements
- Inherited Members
- Extension Methods
Properties
Content
获取纯文本的内容。
public string Content { get; }
Property Value
Emoji
获取 Emoji 表情符号的短代码是否被解析为表情符号。
public bool? Emoji { get; }
Property Value
- bool?
Type
获取元素的类型。
public ElementType Type { get; }
Property Value
Methods
Equals(PlainTextElement?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PlainTextElement? plainTextElement)
Parameters
plainTextElement
PlainTextElement
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator ==(PlainTextElement?, PlainTextElement?)
判定两个 PlainTextElement 是否相等。
public static bool operator ==(PlainTextElement? left, PlainTextElement? right)
Parameters
left
PlainTextElementright
PlainTextElement
Returns
- bool
如果两个 PlainTextElement 相等,则为
true
;否则为false
。
operator !=(PlainTextElement?, PlainTextElement?)
判定两个 PlainTextElement 是否不相等。
public static bool operator !=(PlainTextElement? left, PlainTextElement? right)
Parameters
left
PlainTextElementright
PlainTextElement
Returns
- bool
如果两个 PlainTextElement 不相等,则为
true
;否则为false
。