Class ChannelSelectComponentBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating ChannelSelectComponentInfo.
public class ChannelSelectComponentBuilder : SnowflakeSelectComponentBuilder<ChannelSelectComponentInfo, ChannelSelectComponentBuilder>, ISnowflakeSelectComponentBuilder, IInputComponentBuilder, IModalComponentBuilder
- Inheritance
-
ChannelSelectComponentBuilder
- Implements
- Inherited Members
-
SnowflakeSelectComponentBuilder<ChannelSelectComponentInfo, ChannelSelectComponentBuilder>.MinValuesSnowflakeSelectComponentBuilder<ChannelSelectComponentInfo, ChannelSelectComponentBuilder>.MaxValues
Constructors
ChannelSelectComponentBuilder(ModalBuilder)
Initializes a new ChannelSelectComponentBuilder.
public ChannelSelectComponentBuilder(ModalBuilder modal)
Parameters
modalModalBuilderParent modal of this component.
Properties
ChannelTypes
Gets the presented channel types for this Channel Select.
public IReadOnlyCollection<ChannelType> ChannelTypes { get; }
Property Value
Instance
protected override ChannelSelectComponentBuilder Instance { get; }
Property Value
Methods
AddDefaulValue(ulong)
Adds a default value to DefaultValues.
public ChannelSelectComponentBuilder AddDefaulValue(ulong channelId)
Parameters
channelIdulongThe channel ID to add as a default value.
Returns
- ChannelSelectComponentBuilder
The builder instance.
AddDefaultValues(params IEnumerable<IChannel>)
Adds default values to DefaultValues.
public ChannelSelectComponentBuilder AddDefaultValues(params IEnumerable<IChannel> channels)
Parameters
channelsIEnumerable<IChannel>The channels to add as a default value.
Returns
- ChannelSelectComponentBuilder
The builder instance.
WithChannelTypes(params IEnumerable<ChannelType>)
Sets the value of ChannelTypes.
public ChannelSelectComponentBuilder WithChannelTypes(params IEnumerable<ChannelType> channelTypes)
Parameters
channelTypesIEnumerable<ChannelType>the new value of ChannelTypes.
Returns
- ChannelSelectComponentBuilder
The builder instance.