You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandServiceConfig.cs 3.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System.Collections.Generic;
  2. namespace Discord.Commands
  3. {
  4. public class CommandServiceConfig
  5. {
  6. /// <summary> Gets or sets the default RunMode commands should have, if one is not specified on the Command attribute or builder. </summary>
  7. public RunMode DefaultRunMode { get; set; } = RunMode.Sync;
  8. public char SeparatorChar { get; set; } = ' ';
  9. /// <summary> Determines whether commands should be case-sensitive. </summary>
  10. public bool CaseSensitiveCommands { get; set; } = false;
  11. /// <summary> Gets or sets the minimum log level severity that will be sent to the Log event. </summary>
  12. public LogSeverity LogLevel { get; set; } = LogSeverity.Info;
  13. /// <summary> Determines whether RunMode.Sync commands should push exceptions up to the caller. </summary>
  14. public bool ThrowOnError { get; set; } = true;
  15. /// <summary> Collection of aliases that can wrap strings for command parsing.
  16. /// represents the opening quotation mark and the value is the corresponding closing mark.</summary>
  17. public Dictionary<char, char> QuotationMarkAliasMap { get; set; }
  18. = new Dictionary<char, char> {
  19. {'\"', '\"' },
  20. {'«', '»' },
  21. {'‘', '’' },
  22. {'“', '”' },
  23. {'„', '‟' },
  24. {'‹', '›' },
  25. {'‚', '‛' },
  26. {'《', '》' },
  27. {'〈', '〉' },
  28. {'「', '」' },
  29. {'『', '』' },
  30. {'〝', '〞' },
  31. {'﹁', '﹂' },
  32. {'﹃', '﹄' },
  33. {'"', '"' },
  34. {''', ''' },
  35. {'「', '」' },
  36. {'(', ')' },
  37. {'༺', '༻' },
  38. {'༼', '༽' },
  39. {'᚛', '᚜' },
  40. {'⁅', '⁆' },
  41. {'⌈', '⌉' },
  42. {'⌊', '⌋' },
  43. {'❨', '❩' },
  44. {'❪', '❫' },
  45. {'❬', '❭' },
  46. {'❮', '❯' },
  47. {'❰', '❱' },
  48. {'❲', '❳' },
  49. {'❴', '❵' },
  50. {'⟅', '⟆' },
  51. {'⟦', '⟧' },
  52. {'⟨', '⟩' },
  53. {'⟪', '⟫' },
  54. {'⟬', '⟭' },
  55. {'⟮', '⟯' },
  56. {'⦃', '⦄' },
  57. {'⦅', '⦆' },
  58. {'⦇', '⦈' },
  59. {'⦉', '⦊' },
  60. {'⦋', '⦌' },
  61. {'⦍', '⦎' },
  62. {'⦏', '⦐' },
  63. {'⦑', '⦒' },
  64. {'⦓', '⦔' },
  65. {'⦕', '⦖' },
  66. {'⦗', '⦘' },
  67. {'⧘', '⧙' },
  68. {'⧚', '⧛' },
  69. {'⧼', '⧽' },
  70. {'⸂', '⸃' },
  71. {'⸄', '⸅' },
  72. {'⸉', '⸊' },
  73. {'⸌', '⸍' },
  74. {'⸜', '⸝' },
  75. {'⸠', '⸡' },
  76. {'⸢', '⸣' },
  77. {'⸤', '⸥' },
  78. {'⸦', '⸧' },
  79. {'⸨', '⸩' },
  80. {'【', '】'},
  81. {'〔', '〕' },
  82. {'〖', '〗' },
  83. {'〘', '〙' },
  84. {'〚', '〛' }
  85. };
  86. /// <summary> Determines whether extra parameters should be ignored. </summary>
  87. public bool IgnoreExtraArgs { get; set; } = false;
  88. }
  89. }