Ejemplo n.º 1
0
 /// <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));
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
 public static Channel ModifyChannel(this DiscordClient client, long channelId, ChannelProperties properties)
 {
     return(client.modifyChannel <Channel, ChannelProperties>(channelId, properties));
 }