public void Modify(VoiceChannelProperties properties) { if (!properties.NameProperty.Set) { properties.Name = Name; } if (!properties.PositionProperty.Set) { properties.Position = Position; } if (!properties.ParentProperty.Set) { properties.ParentId = ParentId; } if (!properties.BitrateProperty.Set) { properties.Bitrate = Bitrate; } if (!properties.UserLimitProperty.Set) { properties.UserLimit = UserLimit; } VoiceChannel channel = Client.ModifyVoiceChannel(Id, properties); Name = channel.Name; Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; Bitrate = channel.Bitrate; UserLimit = channel.UserLimit; }
/// <summary> /// Modifies the channel /// </summary> /// <param name="properties">Options for modifying the channel</param> public void Modify(VoiceChannelProperties properties) { VoiceChannel channel = Client.ModifyVoiceChannel(Id, properties); Name = channel.Name; Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; Bitrate = channel.Bitrate; UserLimit = channel.UserLimit; }
/// <summary> /// Modifies the channel /// </summary> /// <param name="properties">Options for modifying the channel</param> public void Modify(VoiceChannelProperties properties) { Update(Client.ModifyGuildChannel(Id, properties)); }
/// <summary> /// Modifies a guild voice channel /// </summary> /// <param name="channelId">ID of the channel</param> /// <param name="properties">Options for modifying the channel</param> /// <returns>The modified <see cref="VoiceChannel"/></returns> public static VoiceChannel ModifyVoiceChannel(this DiscordClient client, ulong channelId, VoiceChannelProperties properties) { return(client.modifyChannel <VoiceChannel, VoiceChannelProperties>(channelId, properties)); }
/// <summary> /// Modifies the channel /// </summary> /// <param name="properties">Options for modifying the channel</param> public void Modify(VoiceChannelProperties properties) { ModifyAsync(properties).GetAwaiter().GetResult(); }
public async Task ModifyAsync(VoiceChannelProperties properties) { Update(await Client.ModifyGuildChannelAsync(Id, properties)); }