Browse Source

Fix emoto try parse (#1941)

tags/3.0.0
Quin Lynch GitHub 3 years ago
parent
commit
900c1f4385
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/Discord.Net.Core/Entities/Emotes/Emote.cs

+ 4
- 0
src/Discord.Net.Core/Entities/Emotes/Emote.cs 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';


Loading…
Cancel
Save