|
@@ -11,6 +11,17 @@ namespace Discord.Commands |
|
|
/// <summary> Use the automatic help command and respond in a private message. </summary> |
|
|
/// <summary> Use the automatic help command and respond in a private message. </summary> |
|
|
Private |
|
|
Private |
|
|
} |
|
|
} |
|
|
|
|
|
[Flags] |
|
|
|
|
|
public enum ActivationMode |
|
|
|
|
|
{ |
|
|
|
|
|
// All of these probably need to be changed |
|
|
|
|
|
/// <summary> Enable command activation by char. </summary> |
|
|
|
|
|
Char = 0x1, |
|
|
|
|
|
/// <summary> Enable command activation when mentioned. </summary> |
|
|
|
|
|
Mention = 0x2, |
|
|
|
|
|
/// <summary> Enable command activation by custom function. </summary> |
|
|
|
|
|
Custom = 0x4 |
|
|
|
|
|
} |
|
|
public class CommandServiceConfig |
|
|
public class CommandServiceConfig |
|
|
{ |
|
|
{ |
|
|
public char? CommandChar |
|
|
public char? CommandChar |
|
@@ -29,10 +40,16 @@ namespace Discord.Commands |
|
|
} |
|
|
} |
|
|
public char[] CommandChars { get { return _commandChars; } set { SetValue(ref _commandChars, value); } } |
|
|
public char[] CommandChars { get { return _commandChars; } set { SetValue(ref _commandChars, value); } } |
|
|
private char[] _commandChars = new char[] { '!' }; |
|
|
private char[] _commandChars = new char[] { '!' }; |
|
|
|
|
|
|
|
|
|
|
|
public Func<Message, int> CustomActivator { get { return _customActivator; } set { SetValue(ref _customActivator, value); } } |
|
|
|
|
|
private Func<Message, int> _customActivator = null; |
|
|
|
|
|
|
|
|
public HelpMode HelpMode { get { return _helpMode; } set { SetValue(ref _helpMode, value); } } |
|
|
public HelpMode HelpMode { get { return _helpMode; } set { SetValue(ref _helpMode, value); } } |
|
|
private HelpMode _helpMode = HelpMode.Disable; |
|
|
private HelpMode _helpMode = HelpMode.Disable; |
|
|
|
|
|
|
|
|
|
|
|
public ActivationMode ActivationMode { get { return _activationMode; } set { SetValue(ref _activationMode, value); } } |
|
|
|
|
|
private ActivationMode _activationMode = ActivationMode.Char; // Set char as default, not sure if it's the best method of doing it |
|
|
|
|
|
|
|
|
//Lock |
|
|
//Lock |
|
|
protected bool _isLocked; |
|
|
protected bool _isLocked; |
|
|
internal void Lock() { _isLocked = true; } |
|
|
internal void Lock() { _isLocked = true; } |
|
|