Don't attempt to convert Embed entities to models if the entity is null

Allows null embeds to be passed into ModifyAsync
This commit is contained in:
Christopher F
2017-03-18 20:36:06 -04:00
parent ba07484fe9
commit 83bd16f329
2 changed files with 58 additions and 70 deletions

View File

@@ -24,6 +24,7 @@ namespace Discord.Rest
}
public static API.Embed ToModel(this Embed entity)
{
if (entity == null) return null;
var model = new API.Embed
{
Type = entity.Type,