Feature: CustomStatusGame Activity (#1406)

* Implement CustomStatusGame activity

Adds the CustomStatusGame class, which is the activity corresponding to the custom status feature.

* Remove unused import from Game.cs
This commit is contained in:
Chris Johnston
2019-11-09 10:41:10 -08:00
committed by Christopher F
parent 5439cbad5a
commit 79a0ea9de3
5 changed files with 73 additions and 1 deletions

View File

@@ -5,6 +5,13 @@ namespace Discord.Rest
{
internal static class EntityExtensions
{
public static IEmote ToIEmote(this API.Emoji model)
{
if (model.Id.HasValue)
return model.ToEntity();
return new Emoji(model.Name);
}
public static GuildEmote ToEntity(this API.Emoji model)
=> new GuildEmote(model.Id.Value,
model.Name,