예제 #1
0
 public ModifyChannelRequest(ulong channelId, ModifyChannelParams changes)
     : base("PUT", $"channels/{channelId}", new { channel = changes })
 {
 }
예제 #2
0
 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));
 }
예제 #3
0
        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
            }));
        }