Beispiel #1
0
 /// <summary>
 /// Search for a emoji on all the servers the bot is on, this method is compatible with standard <see cref="DiscordEmoji"/>.
 /// </summary>
 /// <param name="_"></param>
 /// <param name="emojiNameOrId">Emoji name (can be with ":" or without) or id of it, it can also be the name of a <see cref="DiscordEmoji"/>, the method will also look for.</param>
 /// <returns>A <see cref="DiscordEmoji"/> with the found emoji or <see langword="null"/> if the bot found nothing..</returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="NullReferenceException"></exception>
 public static DiscordEmoji FindEmoji(this DiscordClient _, string emojiNameOrId) => TarsBaseUtilities.FindEmoji(emojiNameOrId);
Beispiel #2
0
 /// <summary>
 /// Convert a <see langword="string"/> to <see cref="DiscordEmoji"/>. Example: "Emoji id", "Emoji name"
 /// </summary>
 /// <param name="stringEmojiOrId"></param>
 /// <returns>A <see cref="DiscordEmoji"/> or <see langword="null"/> if the bot finds nothing.</returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="NullReferenceException"></exception>
 public static DiscordEmoji ToDiscordEmoji(this string stringEmojiOrId) => TarsBaseUtilities.FindEmoji(stringEmojiOrId);