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)
Initializes a new ComponentCommandParameterBuilder.
public ComponentCommandParameterBuilder(ICommandBuilder command, string name, Type type)
Parameters
command
ICommandBuilderParent command of this parameter.
name
stringName of this command.
type
TypeType of this parameter.
Properties
Instance
protected override ComponentCommandParameterBuilder Instance { get; }
Property Value
IsRouteSegmentParameter
Gets whether this parameter is a CustomId segment or a Component value parameter.
public bool IsRouteSegmentParameter { get; }
Property Value
TypeConverter
Get the ComponentTypeConverter assigned to this parameter, if IsRouteSegmentParameter is false.
public ComponentTypeConverter TypeConverter { get; }
Property Value
TypeReader
Get the TypeReader assigned to this parameter, if IsRouteSegmentParameter is true.
public TypeReader TypeReader { get; }
Property Value
Methods
SetIsRouteSegment(bool)
Sets IsRouteSegmentParameter.
public ComponentCommandParameterBuilder SetIsRouteSegment(bool isRouteSegment)
Parameters
isRouteSegment
boolNew value of the IsRouteSegmentParameter.
Returns
- ComponentCommandParameterBuilder
The builder instance.
SetParameterType(Type)
Sets ParameterType.
public override ComponentCommandParameterBuilder SetParameterType(Type type)
Parameters
type
TypeNew value of the ParameterType.
Returns
- ComponentCommandParameterBuilder
The builder instance.
SetParameterType(Type, IServiceProvider)
Sets ParameterType.
public ComponentCommandParameterBuilder SetParameterType(Type type, IServiceProvider services)
Parameters
type
TypeNew value of the ParameterType.
services
IServiceProviderService container to be used to resolve the dependencies of this parameters TypeConverter.
Returns
- ComponentCommandParameterBuilder
The builder instance.