Method AddComponents
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddComponents(params DiscordComponent[])
Adds components to the message.
If WithV2Components() was called, the limit changes to max 40 components in total.
public DiscordMessageBuilder AddComponents(params DiscordComponent[] components)
Parameters
componentsDiscordComponent[]The components to add to the message.
Returns
- DiscordMessageBuilder
The current builder to be chained.
AddComponents(params DiscordActionRowComponent[])
Appends several rows of components to the message
public DiscordMessageBuilder AddComponents(params DiscordActionRowComponent[] components)
Parameters
componentsDiscordActionRowComponent[]The rows of components to add, holding up to five each.
Returns
- DiscordMessageBuilder
The builder to chain calls with.
Exceptions
- ArgumentOutOfRangeException
No components were passed.
AddComponents(IEnumerable<DiscordActionRowComponent>)
Appends several rows of components to the message
public DiscordMessageBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)
Parameters
componentsIEnumerable<DiscordActionRowComponent>The rows of components to add, holding up to five each.
Returns
- DiscordMessageBuilder
The builder to chain calls with.
AddComponents(IEnumerable<DiscordComponent>)
Adds components to the message.
If WithV2Components() was called, the limit changes to max 40 components in total.
public DiscordMessageBuilder AddComponents(IEnumerable<DiscordComponent> components)
Parameters
componentsIEnumerable<DiscordComponent>The components to add to the message.
Returns
- DiscordMessageBuilder
The current builder to be chained.
Exceptions
- ArgumentOutOfRangeException
No components were passed.