Fix emoto try parse (#1941)

This commit is contained in:
Quin Lynch
2021-11-23 11:46:18 -04:00
committed by GitHub
parent 933ea42eaa
commit 900c1f4385

View File

@@ -74,6 +74,10 @@ namespace Discord
public static bool TryParse(string text, out Emote result)
{
result = null;
if (text == null)
return false;
if (text.Length >= 4 && text[0] == '<' && (text[1] == ':' || (text[1] == 'a' && text[2] == ':')) && text[text.Length - 1] == '>')
{
bool animated = text[1] == 'a';