diff --git a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/ComponentBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/ComponentBuilder.cs
index 5193c458..384c19ff 100644
--- a/src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/ComponentBuilder.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/ComponentBuilder.cs
@@ -87,7 +87,7 @@ public class ComponentBuilder
/// The current builder.
public ComponentBuilder RemoveComponentsOfType(ComponentType t)
{
- this.ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c.Type == t));
+ ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c.Type == t));
return this;
}
@@ -98,7 +98,7 @@ public class ComponentBuilder
/// The current builder.
public ComponentBuilder RemoveComponent(string customId)
{
- this.ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c is IInteractableComponent i && i.CustomId == customId));
+ ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c is IInteractableComponentBuilder i && i.CustomId == customId));
return this;
}
@@ -109,7 +109,7 @@ public class ComponentBuilder
/// The current builder.
public ComponentBuilder RemoveButtonByURL(string url)
{
- this.ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c is ButtonComponent b && b.Url == url));
+ ActionRows.ForEach(ar => ar.Components.RemoveAll(c => c is ButtonBuilder b && b.Url == url));
return this;
}
@@ -319,7 +319,7 @@ public class ComponentBuilder
_actionRows.RemoveAt(i);
return _actionRows != null
- ? new MessageComponent(_actionRows.Select(x => x.Build()).OfType().ToList())
+ ? new MessageComponent(_actionRows.Select(IMessageComponent (x) => x.Build()).ToList())
: MessageComponent.Empty;
}
}