Table of Contents

Method TryFromName

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

TryFromName(BaseDiscordClient, string, out DiscordEmoji)

Attempts to create an emoji object from emote name that includes colons (eg. 🤔). This method also supports skin tone variations (eg. 👌:skin-tone-2:), standard emoticons (eg. :D), as well as guild emoji (still specified by :name:).

public static bool TryFromName(BaseDiscordClient client, string name, out DiscordEmoji emoji)

Parameters

client BaseDiscordClient

BaseDiscordClient to attach to the object.

name string

Name of the emote to find, including colons (eg. 🤔).

emoji DiscordEmoji

Resulting DiscordEmoji object.

Returns

bool

Whether the operation was successful.

TryFromName(BaseDiscordClient, string, bool, bool, out DiscordEmoji)

Attempts to get an emoji object from emote name that includes colons (eg. 🤔). This method also supports skin tone variations (eg. 👌:skin-tone-2:), standard emoticons (eg. :D), as well as guild emoji (still specified by :name:).

public static bool TryFromName(BaseDiscordClient client, string name, bool includeGuilds, bool includeApplication, out DiscordEmoji emoji)

Parameters

client BaseDiscordClient

BaseDiscordClient to attach to the object.

name string

Name of the emote to find, including colons (eg. 🤔).

includeGuilds bool

Should guild emojis be included in the search.

includeApplication bool

Should application emojis be included in the search.

emoji DiscordEmoji

Resulting DiscordEmoji object.

Returns

bool

Whether the operation was successful.