Table of Contents

Class BaseCommandProcessor<TEventArgs, TConverter, TConverterContext, TCommandContext>

Namespace
DSharpPlus.Commands.Processors
Assembly
DSharpPlus.Commands.dll
public abstract class BaseCommandProcessor<TEventArgs, TConverter, TConverterContext, TCommandContext> : ICommandProcessor<TEventArgs>, ICommandProcessor where TEventArgs : DiscordEventArgs where TConverter : IArgumentConverter where TConverterContext : ConverterContext where TCommandContext : CommandContext

Type Parameters

TEventArgs
TConverter
TConverterContext
TCommandContext
Inheritance
BaseCommandProcessor<TEventArgs, TConverter, TConverterContext, TCommandContext>
Implements
ICommandProcessor<TEventArgs>
Derived

Fields

extension
lazyConverters
logger

Properties

Commands

List of commands which are registered to this processor

ContextType

Processor specific context type. Context type which is provided on command invokation

ConverterDelegates
Converters

Methods

AddConverter(LazyConverter)
AddConverter(Type, TConverter)
AddConverter<T>(TConverter)
AddConverters(IEnumerable<Type>)
AddConverters(Assembly)
ConfigureAsync(CommandsExtension)

This method is called on initial setup and when the extension is refreshed. Register your needed event handlers here but use a mechanism to track if the inital setup was already done and if this call is only a refresh

CreateCommandContext(TConverterContext, TEventArgs, Dictionary<CommandParameter, object?>)
ExecuteConverterAsync<T>(TConverter, TConverterContext, TEventArgs)

Executes an argument converter on the specified context.

GetConverterFriendlyBaseType(Type)
ParseArgumentsAsync(TConverterContext, TEventArgs)

Parses the arguments provided to the command and returns a prepared command context.