Table of Contents

Interface IComponentContainer

Namespace
Discord
Assembly
Discord.Net.Core.dll

Represents a container with child components.

public interface IComponentContainer
Extension Methods

Properties

Components

Gets the components in the container.

List<IMessageComponentBuilder> Components { get; }

Property Value

List<IMessageComponentBuilder>

MaxChildCount

Gets the maximum number of components allowed in the container.

int MaxChildCount { get; }

Property Value

int

SupportedComponentTypes

Gets the types of child components supported by this container.

ImmutableArray<ComponentType> SupportedComponentTypes { get; }

Property Value

ImmutableArray<ComponentType>

Methods

AddComponent(IMessageComponentBuilder)

Adds a component to the container.

IComponentContainer AddComponent(IMessageComponentBuilder component)

Parameters

component IMessageComponentBuilder

Returns

IComponentContainer

The current container.

AddComponents(params IMessageComponentBuilder[])

Adds components to the container.

IComponentContainer AddComponents(params IMessageComponentBuilder[] components)

Parameters

components IMessageComponentBuilder[]

Returns

IComponentContainer

The current container.

WithComponents(IEnumerable<IMessageComponentBuilder>)

Sets the components in the container.

IComponentContainer WithComponents(IEnumerable<IMessageComponentBuilder> components)

Parameters

components IEnumerable<IMessageComponentBuilder>

Returns

IComponentContainer

The current container.