Table of Contents

Method AddComponents

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddComponents(params DiscordComponent[])

Appends a collection of components to the builder. Each call will append to a new row.

public DiscordInteractionResponseBuilder AddComponents(params DiscordComponent[] components)

Parameters

components DiscordComponent[]

The components to append. Up to five.

Returns

DiscordInteractionResponseBuilder

The current builder to chain calls with.

Exceptions

ArgumentException

Thrown when passing more than 5 components.

AddComponents(IEnumerable<DiscordActionRowComponent>)

Appends several rows of components to the message

public DiscordInteractionResponseBuilder AddComponents(IEnumerable<DiscordActionRowComponent> components)

Parameters

components IEnumerable<DiscordActionRowComponent>

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

Returns

DiscordInteractionResponseBuilder

The current builder to chain calls with.

Exceptions

ArgumentException

Thrown when passing more than 5 components.

AddComponents(IEnumerable<DiscordComponent>)

Appends a collection of components to the builder. Each call will append to a new row.

public DiscordInteractionResponseBuilder AddComponents(IEnumerable<DiscordComponent> components)

Parameters

components IEnumerable<DiscordComponent>

The components to append. Up to five.

Returns

DiscordInteractionResponseBuilder

The current builder to chain calls with.

Exceptions

ArgumentException

Thrown when passing more than 5 components.