using System; namespace Discord.Commands { /// /// Marks the aliases for a command. /// /// /// This attribute allows a command to have one or multiple aliases. In other words, the base command can have /// multiple aliases when triggering the command itself, giving the end-user more freedom of choices when giving /// hot-words to trigger the desired command. See the example for a better illustration. /// /// /// In the following example, the command can be triggered with the base name, "stats", or either "stat" or /// "info". /// /// [Command("stats")] /// [Alias("stat", "info")] /// public async Task GetStatsAsync(IUser user) /// { /// // ...pull stats /// } /// /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class AliasAttribute : Attribute { /// /// Gets the aliases which have been defined for the command. /// public string[] Aliases { get; } /// /// Creates a new with the given aliases. /// public AliasAttribute(params string[] aliases) { Aliases = aliases; } } }