@@ -87,7 +87,7 @@ internal void AddComponent(IMessageComponent component, int row)
87
87
/// <returns>The current builder.</returns>
88
88
public ComponentBuilder RemoveComponentsOfType ( ComponentType t )
89
89
{
90
- this . ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c . Type == t ) ) ;
90
+ ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c . Type == t ) ) ;
91
91
return this ;
92
92
}
93
93
@@ -98,7 +98,7 @@ public ComponentBuilder RemoveComponentsOfType(ComponentType t)
98
98
/// <returns>The current builder.</returns>
99
99
public ComponentBuilder RemoveComponent ( string customId )
100
100
{
101
- this . ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c is IInteractableComponent i && i . CustomId == customId ) ) ;
101
+ ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c is IInteractableComponentBuilder i && i . CustomId == customId ) ) ;
102
102
return this ;
103
103
}
104
104
@@ -109,7 +109,7 @@ public ComponentBuilder RemoveComponent(string customId)
109
109
/// <returns>The current builder.</returns>
110
110
public ComponentBuilder RemoveButtonByURL ( string url )
111
111
{
112
- this . ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c is ButtonComponent b && b . Url == url ) ) ;
112
+ ActionRows . ForEach ( ar => ar . Components . RemoveAll ( c => c is ButtonBuilder b && b . Url == url ) ) ;
113
113
return this ;
114
114
}
115
115
@@ -319,7 +319,7 @@ public MessageComponent Build()
319
319
_actionRows . RemoveAt ( i ) ;
320
320
321
321
return _actionRows != null
322
- ? new MessageComponent ( _actionRows . Select ( x => x . Build ( ) ) . OfType < IMessageComponent > ( ) . ToList ( ) )
322
+ ? new MessageComponent ( _actionRows . Select ( IMessageComponent ( x ) => x . Build ( ) ) . ToList ( ) )
323
323
: MessageComponent . Empty ;
324
324
}
325
325
}
0 commit comments