Implement Command Aliases

This implementation could probably be more efficient, but I
opted for clarity and simplicity where possible.
This commit is contained in:
FiniteReality
2016-08-26 22:23:37 +01:00
parent 99b6e8f07b
commit 95cf63243d
3 changed files with 56 additions and 13 deletions

View File

@@ -0,0 +1,18 @@
using System;
namespace Discord.Commands
{
/// <summary> Provides aliases for a command. </summary>
[AttributeUsage(AttributeTargets.Method)]
public class AliasAttribute : Attribute
{
/// <summary> The aliases which have been defined for the command. </summary>
public string[] Aliases { get; }
/// <summary> Creates a new <see cref="AliasAttribute"/> with the given aliases. </summary>
public AliasAttribute(params string[] aliases)
{
Aliases = aliases;
}
}
}