Table of Contents

Method AddComponents

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddComponents(params DiscordComponent[])

Adds a row of components to a message, up to 5 components per row, and up to 5 rows per message.

public DiscordMessageBuilder AddComponents(params DiscordComponent[] components)

Parameters

components DiscordComponent[]

The components to add to the message.

Returns

DiscordMessageBuilder

The current builder to be chained.

Exceptions

ArgumentOutOfRangeException

No components were passed.

AddComponents(params DiscordActionRowComponent[])

Appends several rows of components to the message

public DiscordMessageBuilder AddComponents(params DiscordActionRowComponent[] components)

Parameters

components DiscordActionRowComponent[]

The rows of components to add, holding up to five each.

Returns

DiscordMessageBuilder

Exceptions

ArgumentOutOfRangeException

No components were passed.

AddComponents(IEnumerable<DiscordActionRowComponent>)

Appends several rows of components to the message

public DiscordMessageBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)

Parameters

components IEnumerable<DiscordActionRowComponent>

The rows of components to add, holding up to five each.

Returns

DiscordMessageBuilder

AddComponents(IEnumerable<DiscordComponent>)

Adds a row of components to a message, up to 5 components per row, and up to 5 rows per message.

public DiscordMessageBuilder AddComponents(IEnumerable<DiscordComponent> components)

Parameters

components IEnumerable<DiscordComponent>

The components to add to the message.

Returns

DiscordMessageBuilder

The current builder to be chained.

Exceptions

ArgumentOutOfRangeException

No components were passed.