Class PlainTextElement
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
A plain text element that can be used in an IModule.
public class PlainTextElement : IElement, IEquatable<PlainTextElement>, IEquatable<IElement>
- Inheritance
-
PlainTextElement
- Implements
- Inherited Members
- Extension Methods
Properties
Content
Gets the KMarkdown content of the element.
public string Content { get; }
Property Value
- string
A string that represents the KMarkdown content of the element.
Emoji
Gets whether the shortcuts should be translated into emojis.
public bool? Emoji { get; }
Property Value
- bool?
A boolean value that indicates whether the shortcuts should be translated into emojis.
true
if the shortcuts should be translated into emojis;false
if the text should be displayed as is.
Type
Gets the type of the element.
public ElementType Type { get; }
Property Value
- ElementType
An ElementType value that represents the theme of the button.
Methods
Equals(PlainTextElement?)
Determines whether the specified PlainTextElement is equal to the current PlainTextElement.
public bool Equals(PlainTextElement? plainTextElement)
Parameters
plainTextElement
PlainTextElementThe PlainTextElement to compare with the current PlainTextElement.
Returns
- bool
true
if the specified PlainTextElement is equal to the current PlainTextElement; otherwise,false
.
Equals(object?)
Determines whether the specified PlainTextElement is equal to the current PlainTextElement.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current PlainTextElement.
Returns
- bool
true
if the specified PlainTextElement is equal to the current PlainTextElement; otherwise,false
.
Remarks
If the object passes is an PlainTextElement, Equals(PlainTextElement?) will be called to compare the 2 instances.
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?)
Determines whether the specified PlainTextElement is equal to the current PlainTextElement.
public static bool operator ==(PlainTextElement? left, PlainTextElement? right)
Parameters
left
PlainTextElementright
PlainTextElement
Returns
- bool
true
if the specified PlainTextElement is equal to the current PlainTextElement; otherwise,false
.
operator !=(PlainTextElement?, PlainTextElement?)
Determines whether the specified PlainTextElement is not equal to the current PlainTextElement.
public static bool operator !=(PlainTextElement? left, PlainTextElement? right)
Parameters
left
PlainTextElementright
PlainTextElement
Returns
- bool
true
if the specified PlainTextElement is not equal to the current PlainTextElement; otherwise,false
.