From bc985ada926e090941da0a7526eb15578d4bb8e4 Mon Sep 17 00:00:00 2001 From: AntiTcb Date: Mon, 19 Dec 2016 17:53:54 -0500 Subject: [PATCH 1/2] Modules without aliases now default to an empty string alias --- src/Discord.Net.Commands/Info/ModuleInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Commands/Info/ModuleInfo.cs b/src/Discord.Net.Commands/Info/ModuleInfo.cs index 2a6439c02..bff9d9a56 100644 --- a/src/Discord.Net.Commands/Info/ModuleInfo.cs +++ b/src/Discord.Net.Commands/Info/ModuleInfo.cs @@ -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(); + if (result == null) //there were no aliases; default to an empty string alias + result = new List { "" }; return result; } From 5118ed876b60d1837ae2d990fc007e7f21a1cc60 Mon Sep 17 00:00:00 2001 From: AntiTcb Date: Mon, 19 Dec 2016 17:54:06 -0500 Subject: [PATCH 2/2] Can target classes now. --- src/Discord.Net.Commands/Attributes/AliasAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/Attributes/AliasAttribute.cs b/src/Discord.Net.Commands/Attributes/AliasAttribute.cs index 9aa1371f6..6e115bd60 100644 --- a/src/Discord.Net.Commands/Attributes/AliasAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/AliasAttribute.cs @@ -3,7 +3,7 @@ using System; namespace Discord.Commands { /// Provides aliases for a command. - [AttributeUsage(AttributeTargets.Method)] + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] public class AliasAttribute : Attribute { /// The aliases which have been defined for the command.