using System.Threading.Tasks; namespace Discord.Interactions { /// /// Represents a configuration class for . /// public class InteractionServiceConfig { /// /// Gets or sets the minimum log level severity that will be sent to the event. /// public LogSeverity LogLevel { get; set; } = LogSeverity.Info; /// /// Gets or sets the default commands should have, if one is not specified on the /// Command attribute or builder. /// public RunMode DefaultRunMode { get; set; } = RunMode.Async; /// /// Gets or sets whether commands should push exceptions up to the caller. /// public bool ThrowOnError { get; set; } = true; /// /// Gets or sets the delimiters that will be used to seperate group names and the method name when a Message Component Interaction is recieved. /// public char[] InteractionCustomIdDelimiters { get; set; } /// /// Gets or sets the string expression that will be treated as a wild card. /// public string WildCardExpression { get; set; } /// /// 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. /// /// /// For performance reasons, if you frequently use s with the service, it is highly recommended that you enable compiled lambdas. /// public bool UseCompiledLambda { get; set; } = false; /// /// Gets or sets the option allowing you to use s. /// /// /// Since s are prioritized over s, if s are not used, this should be /// disabled to decrease the lookup time. /// public bool EnableAutocompleteHandlers { get; set; } = true; /// /// Gets or sets whether new service scopes should be automatically created when resolving module depedencies on every command execution. /// public bool AutoServiceScopes { get; set; } = true; /// /// Gets or sets delegate to be used by the when responding to a Rest based interaction. /// public RestResponseCallback RestResponseCallback { get; set; } = (ctx, str) => Task.CompletedTask; /// /// Gets or sets whether a command execution should exit when a modal command encounters a missing modal component value. /// public bool ExitOnMissingModalField { get; set; } = false; } /// /// Represents a cached delegate for creating interaction responses to webhook based Discord Interactions. /// /// Execution context that will be injected into the module class. /// Body of the interaction response. /// /// A task representing the response operation. /// public delegate Task RestResponseCallback(IInteractionContext context, string responseBody); }