using System.Collections.ObjectModel; using System.Reflection; namespace VpSharp.Commands; /// /// Represents a registered command. /// public sealed class Command { internal Command(string name, string[] aliases, MethodInfo method, CommandModule module) { Name = name; Aliases = new ReadOnlyCollection(aliases); Method = method; Module = module; Parameters = method.GetParameters()[1..]; } /// /// Gets the aliases for this command. /// /// The aliases. public IReadOnlyList Aliases { get; } /// /// Gets the name of this command. /// /// The name. public string Name { get; } internal MethodInfo Method { get; } internal CommandModule Module { get; } internal ParameterInfo[] Parameters { get; } }