Fix emoto try parse (#1941)
This commit is contained in:
@@ -74,6 +74,10 @@ namespace Discord
|
|||||||
public static bool TryParse(string text, out Emote result)
|
public static bool TryParse(string text, out Emote result)
|
||||||
{
|
{
|
||||||
result = null;
|
result = null;
|
||||||
|
|
||||||
|
if (text == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (text.Length >= 4 && text[0] == '<' && (text[1] == ':' || (text[1] == 'a' && text[2] == ':')) && text[text.Length - 1] == '>')
|
if (text.Length >= 4 && text[0] == '<' && (text[1] == ':' || (text[1] == 'a' && text[2] == ':')) && text[text.Length - 1] == '>')
|
||||||
{
|
{
|
||||||
bool animated = text[1] == 'a';
|
bool animated = text[1] == 'a';
|
||||||
|
|||||||
Reference in New Issue
Block a user