Merge pull request #431 from AntiTcb/issues/427
Issues/427 + AliasAttribute targets classes
This commit is contained in:
@@ -3,7 +3,7 @@ using System;
|
||||
namespace Discord.Commands
|
||||
{
|
||||
/// <summary> Provides aliases for a command. </summary>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
||||
public class AliasAttribute : Attribute
|
||||
{
|
||||
/// <summary> The aliases which have been defined for the command. </summary>
|
||||
|
||||
@@ -65,8 +65,8 @@ namespace Discord.Commands
|
||||
result = level.Aliases.Permutate(result, (second, first) => first + " " + second);
|
||||
}
|
||||
|
||||
if (result == null) //there were no aliases; default to an empty list
|
||||
result = new List<string>();
|
||||
if (result == null) //there were no aliases; default to an empty string alias
|
||||
result = new List<string> { "" };
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user