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.
If WithV2Components() was called, the limit changes to 10 top-level components and max
30 components in total.
public DiscordFollowupMessageBuilder AddComponents(params DiscordComponent[] components)
Parameters
componentsDiscordComponent[]The collection of components to add.
Returns
- DiscordFollowupMessageBuilder
The builder to chain calls with.
AddComponents(params DiscordActionRowComponent[])
Appends several rows of components to the message
public DiscordFollowupMessageBuilder AddComponents(params DiscordActionRowComponent[] components)
Parameters
componentsDiscordActionRowComponent[]The rows of components to add, holding up to five each.
Returns
- DiscordFollowupMessageBuilder
The builder to chain calls with.
Exceptions
- ArgumentOutOfRangeException
No components were passed.
AddComponents(IEnumerable<DiscordActionRowComponent>)
Appends several rows of components to the message
public DiscordFollowupMessageBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)
Parameters
componentsIEnumerable<DiscordActionRowComponent>The rows of components to add, holding up to five each.
Returns
- DiscordFollowupMessageBuilder
The builder to chain calls with.
AddComponents(IEnumerable<DiscordComponent>)
Appends a collection of components to the message.
public DiscordFollowupMessageBuilder AddComponents(IEnumerable<DiscordComponent> components)
Parameters
componentsIEnumerable<DiscordComponent>The collection of components to add.
Returns
- DiscordFollowupMessageBuilder
The builder to chain calls with.
Exceptions
- ArgumentException
componentscontained more than 5 components.