Interface IEmote
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
Represents a general container for any type of emote in a message.
public interface IEmote
Examples
The sample below sends a message and adds an Emoji and a custom Emote to the message.
public async Task SendAndReactAsync(ISocketMessageChannel channel)
{
var message = await channel.SendMessageAsync("I am a message.");
// Creates a Unicode-based emoji based on the Unicode string.
// This is effectively the same as new Emoji("💕").
var heartEmoji = new Emoji("\U0001f495");
// Reacts to the message with the Emoji.
await message.AddReactionAsync(heartEmoji);
// Parses a custom emote based on the provided Discord emote format.
// Please note that this does not guarantee the existence of
// the emote.
var emote = Emote.Parse("<:thonkang:282745590985523200>");
// Reacts to the message with the Emote.
await message.AddReactionAsync(emote);
}
Result
Remarks
This interface is often used with reactions. It can represent an unicode-based Emoji, or a custom Emote.
Properties
Name
Gets the display name or Unicode representation of this emote.
string Name { get; }
Property Value
- string
A string representing the display name or the Unicode representation (e.g.
🤔
) of this emote.