Class InteractionServiceConfig
Represents a configuration class for InteractionService.
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public class InteractionServiceConfig : object
Properties
| Improve this Doc View SourceAutoServiceScopes
Gets or sets whether new service scopes should be automatically created when resolving module dependencies on every command execution.
Declaration
public bool AutoServiceScopes { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
DefaultRunMode
Gets or sets the default RunMode commands should have, if one is not specified on the Command attribute or builder.
Declaration
public RunMode DefaultRunMode { get; set; }
Property Value
Type | Description |
---|---|
RunMode |
EnableAutocompleteHandlers
Gets or sets the option allowing you to use AutocompleteHandlers.
Declaration
public bool EnableAutocompleteHandlers { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
Declaration
public bool ExitOnMissingModalField { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
Declaration
public char[] InteractionCustomIdDelimiters { get; set; }
Property Value
Type | Description |
---|---|
Char[] |
LocalizationManager
Localization provider to be used when registering application commands.
Declaration
public ILocalizationManager LocalizationManager { get; set; }
Property Value
Type | Description |
---|---|
ILocalizationManager |
LogLevel
Gets or sets the minimum log level severity that will be sent to the Log event.
Declaration
public LogSeverity LogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogSeverity |
RestResponseCallback
Gets or sets delegate to be used by the InteractionService when responding to a Rest based interaction.
Declaration
public RestResponseCallback RestResponseCallback { get; set; }
Property Value
Type | Description |
---|---|
RestResponseCallback |
ThrowOnError
Gets or sets whether Sync commands should push exceptions up to the caller.
Declaration
public bool ThrowOnError { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
Declaration
public bool UseCompiledLambda { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
Declaration
public string WildCardExpression { get; set; }
Property Value
Type | Description |
---|---|
String |