1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-22 19:38:47 +00:00
VpSharp/VpSharp.Commands/Command.cs

37 lines
878 B
C#

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