using System;
namespace Discord.Commands
{
///
/// Marks the execution information for a command.
///
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class CommandAttribute : Attribute
{
///
/// Gets the text that has been set to be recognized as a command.
///
public string Text { get; }
///
/// Specifies the of the command. This affects how the command is executed.
///
public RunMode RunMode { get; set; } = RunMode.Default;
public bool? IgnoreExtraArgs { get; }
///
public CommandAttribute()
{
Text = null;
}
///
/// Initializes a new attribute with the specified name.
///
/// The name of the command.
public CommandAttribute(string text)
{
Text = text;
}
public CommandAttribute(string text, bool ignoreExtraArgs)
{
Text = text;
IgnoreExtraArgs = ignoreExtraArgs;
}
}
}