Table of Contents

Class GuildEmote

Namespace
Discord
Assembly
Discord.Net.Core.dll

An image-based emote that is attached to a guild.

public class GuildEmote : Emote, IEmote, ISnowflakeEntity, IEntity<ulong>
Inheritance
GuildEmote
Implements
Inherited Members

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

CreatorId

Gets the user ID associated with the creation of this emoji.

public ulong? CreatorId { get; }

Property Value

ulong?

An ulong snowflake identifier representing the user who created this emoji; null if unknown.

IsAvailable

Gets whether this emoji is available. null if unknown.

public bool? IsAvailable { get; }

Property Value

bool?

IsManaged

Gets whether this emoji is managed by an integration.

public bool IsManaged { get; }

Property Value

bool

A boolean that determines whether or not this emote is managed by a Twitch integration.

RequireColons

Gets whether this emoji must be wrapped in colons.

public bool RequireColons { get; }

Property Value

bool

A boolean that determines whether or not this emote requires the use of colons in chat to be used.

RoleIds

Gets the roles that are allowed to use this emoji.

public IReadOnlyList<ulong> RoleIds { get; }

Property Value

IReadOnlyList<ulong>

A read-only list containing snowflake identifiers for roles that are allowed to use this emoji.

Methods

ToString()

Gets 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>).