Skip to content

Commit 4d3f472

Browse files
committed
docs: docstrings for EmoteUtilities
1 parent 40a53cf commit 4d3f472

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Discord.Net/Utilities/EmoteUtilities.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ namespace Discord
44
{
55
public static class EmoteUtilities
66
{
7+
/// <summary>
8+
/// Generate the plaintext tag format for a guild emote
9+
/// </summary>
10+
/// <param name="id">The snowflake ID of the emote</param>
11+
/// <param name="name">The display name of the emote</param>
12+
/// <returns>The plaintext tag for a guild emote</returns>
713
public static string FormatGuildEmote(ulong id, string name)
814
=> $"<:{name}:{id}>";
915

1016
// TODO: perf: bench whether this should be passed by ref (in)
17+
/// <summary>
18+
/// Parse a plaintext emote tag
19+
/// </summary>
20+
/// <param name="formatted">A string containing the plaintext emote tag</param>
21+
/// <param name="result">A tuple containing the parsed ID and display name</param>
22+
/// <returns>True, if the emote could be parsed; false, if the format was incorrect.</returns>
1123
public static bool TryParseGuildEmote(ReadOnlySpan<char> formatted, out (ulong, string) result)
1224
{
1325
result = default;

0 commit comments

Comments
 (0)