예제 #1
0
 protected void Update(GuildChannel channel)
 {
     base.Update(channel);
     Position             = channel.Position;
     ParentId             = channel.ParentId;
     PermissionOverwrites = channel.PermissionOverwrites;
 }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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;
        }
예제 #4
0
        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;
        }