-
-
Notifications
You must be signed in to change notification settings - Fork 299
/
CommandsConfiguration.cs
34 lines (30 loc) · 1.41 KB
/
CommandsConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace DSharpPlus.Commands;
/// <summary>
/// The configuration copied to an instance of <see cref="CommandsExtension"/>.
/// </summary>
public sealed record CommandsConfiguration
{
/// <summary>
/// The guild id to use for debugging. Leave as 0 to disable.
/// </summary>
public ulong DebugGuildId { get; set; }
/// <summary>
/// Whether to enable the default command error handler.
/// </summary>
public bool UseDefaultCommandErrorHandler { get; set; } = true;
/// <summary>
/// Whether to register default command processors when they're not found in the processor list.
/// </summary>
/// <remarks>
/// You may still provide your own custom processors via <see cref="CommandsExtension.AddProcessorsAsync(Processors.ICommandProcessor[])"/>,
/// as this configuration option will only add the default processors if they're not found in the list.
/// </remarks>
public bool RegisterDefaultCommandProcessors { get; set; } = true;
/// <summary>
/// The command executor to use for command execution.
/// </summary>
/// <remarks>
/// The command executor is responsible for executing context checks, making full use of the dependency injection system, executing the command method itself, and handling errors.
/// </remarks>
public ICommandExecutor CommandExecutor { get; set; } = new DefaultCommandExecutor();
}