Table of Contents

Class ComponentCommandParameterBuilder

Namespace
Discord.Interactions.Builders
Assembly
Discord.Net.Interactions.dll

Represents a builder for creating ComponentCommandParameterInfo.

public class ComponentCommandParameterBuilder : ParameterBuilder<ComponentCommandParameterInfo, ComponentCommandParameterBuilder>, IParameterBuilder
Inheritance
ComponentCommandParameterBuilder
Implements
Inherited Members

Constructors

ComponentCommandParameterBuilder(ICommandBuilder, string, Type)

public ComponentCommandParameterBuilder(ICommandBuilder command, string name, Type type)

Parameters

command ICommandBuilder

Parent command of this parameter.

name string

Name of this command.

type Type

Type of this parameter.

Properties

Instance

protected override ComponentCommandParameterBuilder Instance { get; }

Property Value

ComponentCommandParameterBuilder

IsRouteSegmentParameter

Gets whether this parameter is a CustomId segment or a Component value parameter.

public bool IsRouteSegmentParameter { get; }

Property Value

bool

TypeConverter

Get the ComponentTypeConverter assigned to this parameter, if IsRouteSegmentParameter is false.

public ComponentTypeConverter TypeConverter { get; }

Property Value

ComponentTypeConverter

TypeReader

Get the TypeReader assigned to this parameter, if IsRouteSegmentParameter is true.

public TypeReader TypeReader { get; }

Property Value

TypeReader

Methods

SetIsRouteSegment(bool)

public ComponentCommandParameterBuilder SetIsRouteSegment(bool isRouteSegment)

Parameters

isRouteSegment bool

New value of the IsRouteSegmentParameter.

Returns

ComponentCommandParameterBuilder

The builder instance.

SetParameterType(Type)

public override ComponentCommandParameterBuilder SetParameterType(Type type)

Parameters

type Type

New value of the ParameterType.

Returns

ComponentCommandParameterBuilder

The builder instance.

SetParameterType(Type, IServiceProvider)

public ComponentCommandParameterBuilder SetParameterType(Type type, IServiceProvider services)

Parameters

type Type

New value of the ParameterType.

services IServiceProvider

Service container to be used to resolve the dependencies of this parameters TypeConverter.

Returns

ComponentCommandParameterBuilder

The builder instance.