Browse Source

Merge pull request #431 from AntiTcb/issues/427

Issues/427 + AliasAttribute targets classes
tags/1.0-rc
Christopher F GitHub 8 years ago
parent
commit
f64de4ab47
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/Discord.Net.Commands/Attributes/AliasAttribute.cs
  2. +2
    -2
      src/Discord.Net.Commands/Info/ModuleInfo.cs

+ 1
- 1
src/Discord.Net.Commands/Attributes/AliasAttribute.cs View File

@@ -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>


+ 2
- 2
src/Discord.Net.Commands/Info/ModuleInfo.cs View File

@@ -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;
}


Loading…
Cancel
Save