Method AddComponents
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddComponents(params DiscordComponent[])
Adds a row of components to the builder, up to 5 components per row, and up to 5 rows per message.
public DiscordWebhookBuilder AddComponents(params DiscordComponent[] components)
Parameters
components
DiscordComponent[]The components to add to the builder.
Returns
- DiscordWebhookBuilder
The current builder to be chained.
Exceptions
- ArgumentOutOfRangeException
No components were passed.
AddComponents(IEnumerable<DiscordActionRowComponent>)
Appends several rows of components to the builder
public DiscordWebhookBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)
Parameters
components
IEnumerable<DiscordActionRowComponent>The rows of components to add, holding up to five each.
Returns
AddComponents(IEnumerable<DiscordComponent>)
Adds a row of components to the builder, up to 5 components per row, and up to 5 rows per message.
public DiscordWebhookBuilder AddComponents(IEnumerable<DiscordComponent> components)
Parameters
components
IEnumerable<DiscordComponent>The components to add to the builder.
Returns
- DiscordWebhookBuilder
The current builder to be chained.
Exceptions
- ArgumentOutOfRangeException
No components were passed.