Search Results for

    Show / Hide Table of Contents

    Interface IEmote

    Represents a general container for any type of emote in a message.

    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public interface IEmote
    Remarks

    This interface is often used with reactions. It can represent an unicode-based Emoji, or a custom Emote.

    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

    React Example

    Properties

    | Improve this Doc View Source

    Name

    Gets the display name or Unicode representation of this emote.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String

    A string representing the display name or the Unicode representation (e.g. 🤔) of this emote.

    See Also

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2023 3.10.0