/// <summary> /// Modifies a channel /// </summary> /// <param name="channelId">ID of the channel</param> /// <param name="properties">Options for modifying the channel</param> /// <returns>The modified <see cref="Channel"/></returns> public static Channel ModifyChannel(this DiscordClient client, ulong channelId, ChannelProperties properties) { return(client.HttpClient.Patch($"/channels/{channelId}", JsonConvert.SerializeObject(properties)).Deserialize <Channel>().SetClient(client)); }
/// <summary> /// Modifies the channel /// </summary> /// <param name="properties">Options for modifying the channel</param> public void Modify(ChannelProperties properties) { Name = Client.ModifyChannel(Id, properties).Name; }
public static Channel ModifyChannel(this DiscordClient client, long channelId, ChannelProperties properties) { return(client.modifyChannel <Channel, ChannelProperties>(channelId, properties)); }