public ModifyChannelRequest(ulong channelId, ModifyChannelParams changes) : base("PUT", $"channels/{channelId}", new { channel = changes }) { }
public async Task <Channel> ModifyChannelAsync(ulong channelId, ModifyChannelParams changes, RequestOptions options) { options = RequestOptions.CreateOrClone(options); return(await SendJsonAsync <Channel>(new ModifyChannelRequest(channelId, changes), options).ConfigureAwait(false)); }
public async Task <IActionResult> ModifyGuildChannelAsync(Snowflake channelId, [FromBody] ModifyChannelParams args) { args.Validate(); return(Ok(new Channel { Id = channelId, Bitrate = args.Bitrate, Name = args.Name, ParentId = args.ParentId, PermissionOverwrites = args.PermissionOverwrites, Position = args.Position, Topic = args.Topic, UserLimit = args.UserLimit })); }