Table of Contents

Class InteractionServiceConfig

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

Represents a configuration class for InteractionService.

public class InteractionServiceConfig
Inheritance
InteractionServiceConfig
Inherited Members

Properties

AutoServiceScopes

Gets or sets whether new service scopes should be automatically created when resolving module dependencies on every command execution.

public bool AutoServiceScopes { get; set; }

Property Value

bool

DefaultRunMode

Gets or sets the default RunMode commands should have, if one is not specified on the Command attribute or builder.

public RunMode DefaultRunMode { get; set; }

Property Value

RunMode

EnableAutocompleteHandlers

Gets or sets the option allowing you to use AutocompleteHandlers.

public bool EnableAutocompleteHandlers { get; set; }

Property Value

bool

Remarks

Since AutocompleteHandlers are prioritized over AutocompleteCommandInfos, if AutocompleteHandlers are not used, this should be disabled to decrease the lookup time.

ExitOnMissingModalField

Gets or sets whether a command execution should exit when a modal command encounters a missing modal component value.

public bool ExitOnMissingModalField { get; set; }

Property Value

bool

InteractionCustomIdDelimiters

Gets or sets the delimiters that will be used to separate group names and the method name when a Message Component Interaction is received.

public char[] InteractionCustomIdDelimiters { get; set; }

Property Value

char[]

LocalizationManager

Localization provider to be used when registering application commands.

public ILocalizationManager LocalizationManager { get; set; }

Property Value

ILocalizationManager

LogLevel

Gets or sets the minimum log level severity that will be sent to the Log event.

public LogSeverity LogLevel { get; set; }

Property Value

LogSeverity

RestResponseCallback

Gets or sets delegate to be used by the InteractionService when responding to a Rest based interaction.

public RestResponseCallback RestResponseCallback { get; set; }

Property Value

RestResponseCallback

ThrowOnError

Gets or sets whether Sync commands should push exceptions up to the caller.

public bool ThrowOnError { get; set; }

Property Value

bool

UseCompiledLambda

Gets or sets the option to use compiled lambda expressions to create module instances and execute commands. This method improves performance at the cost of memory.

public bool UseCompiledLambda { get; set; }

Property Value

bool

Remarks

For performance reasons, if you frequently use Modals with the service, it is highly recommended that you enable compiled lambdas.

WildCardExpression

Gets or sets the string expression that will be treated as a wild card.

public string WildCardExpression { get; set; }

Property Value

string