protected void Update(GuildChannel channel) { base.Update(channel); Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; }
/// <summary> /// Modifies the channel /// </summary> /// <param name="properties">Options for modifying the channel</param> public void Modify(GuildChannelProperties properties) { GuildChannel channel = Client.ModifyGuildChannel(Id, properties); Name = channel.Name; Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; }
/// <summary> /// Updates the channel /// </summary> public override void Update() { GuildChannel channel = Client.GetGuildChannel(Id); Name = channel.Name; Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; }
public void Modify(GuildChannelProperties properties) { if (!properties.NameProperty.Set) { properties.Name = Name; } if (!properties.PositionProperty.Set) { properties.Position = Position; } if (!properties.ParentProperty.Set) { properties.ParentId = ParentId; } GuildChannel channel = Client.ModifyGuildChannel(Id, properties); Name = channel.Name; Position = channel.Position; ParentId = channel.ParentId; PermissionOverwrites = channel.PermissionOverwrites; }