Table of Contents

Class SlashCommandParameter<TContext>

Namespace
NetCord.Services.ApplicationCommands
Assembly
NetCord.Services.dll
public class SlashCommandParameter<TContext> where TContext : IApplicationCommandContext

Type Parameters

TContext
Inheritance
SlashCommandParameter<TContext>
Inherited Members

Properties

AllowedChannelTypes

public IEnumerable<ChannelType>? AllowedChannelTypes { get; }

Property Value

IEnumerable<ChannelType>

Attributes

public IReadOnlyDictionary<Type, IReadOnlyList<Attribute>> Attributes { get; }

Property Value

IReadOnlyDictionary<Type, IReadOnlyList<Attribute>>

AutocompleteProviderType

public Type? AutocompleteProviderType { get; }

Property Value

Type

ChoicesProvider

public IChoicesProvider<TContext>? ChoicesProvider { get; }

Property Value

IChoicesProvider<TContext>

DefaultValue

public object? DefaultValue { get; }

Property Value

object

Description

public string Description { get; }

Property Value

string

HasDefaultValue

public bool HasDefaultValue { get; }

Property Value

bool

LocalizationPath

public ImmutableList<LocalizationPathSegment> LocalizationPath { get; }

Property Value

ImmutableList<LocalizationPathSegment>

LocalizationsProvider

public ILocalizationsProvider? LocalizationsProvider { get; }

Property Value

ILocalizationsProvider

MaxLength

public int? MaxLength { get; }

Property Value

int?

MaxValue

public double? MaxValue { get; }

Property Value

double?

MinLength

public int? MinLength { get; }

Property Value

int?

MinValue

public double? MinValue { get; }

Property Value

double?

Name

public string Name { get; }

Property Value

string

NonNullableType

public Type NonNullableType { get; }

Property Value

Type

Preconditions

public IReadOnlyList<ParameterPreconditionAttribute<TContext>> Preconditions { get; }

Property Value

IReadOnlyList<ParameterPreconditionAttribute<TContext>>

Type

public Type Type { get; }

Property Value

Type

TypeReader

public SlashCommandTypeReader<TContext> TypeReader { get; }

Property Value

SlashCommandTypeReader<TContext>

Methods

GetRawValueAsync(CancellationToken)

public ValueTask<ApplicationCommandOptionProperties> GetRawValueAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask<ApplicationCommandOptionProperties>

InvokeAutocompleteAsync<TAutocompleteContext>(TAutocompleteContext, ApplicationCommandInteractionDataOption, IServiceProvider?)

public ValueTask<IEnumerable<ApplicationCommandOptionChoiceProperties>?> InvokeAutocompleteAsync<TAutocompleteContext>(TAutocompleteContext context, ApplicationCommandInteractionDataOption option, IServiceProvider? serviceProvider) where TAutocompleteContext : IAutocompleteInteractionContext

Parameters

context TAutocompleteContext
option ApplicationCommandInteractionDataOption
serviceProvider IServiceProvider

Returns

ValueTask<IEnumerable<ApplicationCommandOptionChoiceProperties>>

Type Parameters

TAutocompleteContext