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

@@ -33,8 +33,11 @@ namespace Discord.Rest
UserLimit = model.UserLimit.Value;
}
public Task ModifyAsync(Action<ModifyVoiceChannelParams> func, RequestOptions options = null)
=> ChannelHelper.ModifyAsync(this, Discord, func, options);
public async Task ModifyAsync(Action<ModifyVoiceChannelParams> func, RequestOptions options = null)
{
var model = await ChannelHelper.ModifyAsync(this, Discord, func, options);
Update(model);
}
private string DebuggerDisplay => $"{Name} ({Id}, Voice)";