using System; namespace axXez.TS3.Bot { /// Marks a method as a bot command and configures its keyword, description, parameters, role, and scope. [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public class CommandAttribute : Attribute { /// The command keyword without the leading !. Use spaces for sub-commands, e.g. "bot status". public string Keyword { get; set; } /// Short description shown in !help output. public string Description { get; set; } /// Overrides the auto-generated parameter signature in help output, e.g. "<name> [seconds]". Leave null to auto-generate from the method signature. public string Parameters { get; set; } /// Minimum role required to invoke this command. Defaults to . public CommandRole Role { get; set; } = CommandRole.User; /// Which chat scopes this command responds to. Defaults to . public CommandScope Scope { get; set; } = CommandScope.Private; /// Initializes the attribute with the given command keyword. public CommandAttribute(string keyword) { Keyword = keyword; } } }