File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/Discord.Net/Utilities Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,22 @@ namespace Discord
4
4
{
5
5
public static class EmoteUtilities
6
6
{
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>
7
13
public static string FormatGuildEmote ( ulong id , string name )
8
14
=> $ "<:{ name } :{ id } >";
9
15
10
16
// 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>
11
23
public static bool TryParseGuildEmote ( ReadOnlySpan < char > formatted , out ( ulong , string ) result )
12
24
{
13
25
result = default ;
You can’t perform that action at this time.
0 commit comments