Added length to Emoji

This commit is contained in:
RogueException
2016-10-06 05:46:37 -03:00
parent b600763071
commit abd315ed21
2 changed files with 4 additions and 2 deletions

View File

@@ -7,14 +7,16 @@ namespace Discord
public ulong Id { get; } public ulong Id { get; }
public string Name { get; } public string Name { get; }
public int Index { get; } public int Index { get; }
public int Length { get; }
public string Url => CDN.GetEmojiUrl(Id); public string Url => CDN.GetEmojiUrl(Id);
internal Emoji(ulong id, string name, int index) internal Emoji(ulong id, string name, int index, int length)
{ {
Id = id; Id = id;
Name = name; Name = name;
Index = index; Index = index;
Length = length;
} }
} }
} }

View File

@@ -45,7 +45,7 @@ namespace Discord.Rest
{ {
ulong id; ulong id;
if (ulong.TryParse(match.Groups[2].Value, NumberStyles.None, CultureInfo.InvariantCulture, out id)) if (ulong.TryParse(match.Groups[2].Value, NumberStyles.None, CultureInfo.InvariantCulture, out id))
builder.Add(new Emoji(id, match.Groups[1].Value, match.Index)); builder.Add(new Emoji(id, match.Groups[1].Value, match.Index, match.Length));
} }
return builder.ToImmutable(); return builder.ToImmutable();
} }