Class Emote
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
Represents a guild emote.
public class Emote : IEmote, IEntity<string>
- Inheritance
-
Emote
- Implements
- Derived
- Inherited Members
Constructors
Emote(string, string, bool?)
Creates a new instance of Emote.
public Emote(string id, string name, bool? animated = null)
Parameters
Properties
Animated
Gets whether this emote is animated.
public bool? Animated { get; }
Property Value
- bool?
Id
Gets the identifier of this emote.
public string Id { get; }
Property Value
Name
Gets the name of this emote.
public string Name { get; }
Property Value
Methods
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.
Parse(string?, TagMode)
Parses an Emote from its raw format.
public static Emote Parse(string? text, TagMode tagMode)
Parameters
text
stringThe raw encoding of an emote; for example, [:emotename:1991895624896587/hbCFVWhu923k03k] when
tagMode
isTagMode.PlainText
, or (emj)emotename(emj)[1991895624896587/hbCFVWhu923k03k] whentagMode
isTagMode.KMarkdown
.tagMode
TagMode
Returns
- Emote
An emote.
Exceptions
- ArgumentException
Invalid emote format.
ToKMarkdownString()
Gets a string representation of the emote in KMarkdown format.
public string ToKMarkdownString()
Returns
ToPlainTextString()
Gets a string representation of the emote in plain text format.
public string ToPlainTextString()
Returns
ToString()
Returns the raw representation of the emote.
public override string ToString()
Returns
- string
A string representing the raw presentation of the emote (e.g.
[:thonkang:282745590985523200]
).
TryParse(string?, out Emote?, TagMode)
Tries to parse an Emote from its raw format.
public static bool TryParse(string? text, out Emote? result, TagMode tagMode)
Parameters
text
stringThe raw encoding of an emote; for example, [:emotename:1991895624896587/hbCFVWhu923k03k] when
tagMode
isTagMode.PlainText
, or (emj)emotename(emj)[1991895624896587/hbCFVWhu923k03k] whentagMode
isTagMode.KMarkdown
.result
EmoteAn emote.
tagMode
TagMode