Update REST models on modify

This commit is contained in:
RogueException
2016-10-08 14:33:51 -03:00
parent bedf601bfe
commit 8f5b5347b4
12 changed files with 85 additions and 43 deletions

View File

@@ -47,7 +47,8 @@ namespace Discord.Rest
{
if (Id != Discord.CurrentUser.Id)
throw new InvalidOperationException("Unable to modify this object using a different token.");
await UserHelper.ModifyAsync(this, Discord, func, options);
var model = await UserHelper.ModifyAsync(this, Discord, func, options);
Update(model);
}
Task ISelfUser.ModifyStatusAsync(Action<ModifyPresenceParams> func, RequestOptions options) { throw new NotSupportedException(); }