1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-14 04:05:41 +00:00
VpSharp/VpSharp.Commands/Command.cs

37 lines
856 B
C#

using System.Reflection;
namespace VpSharp.Commands;
/// <summary>
/// Represents a registered command.
/// </summary>
public sealed class Command
{
internal Command(string name, 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 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; }
}