Browse Source

Return a list instead of an array (#2451)

tags/3.8.1
Damian Kraaijeveld GitHub 2 years ago
parent
commit
376a812b6a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Interactions/Utilities/CommandHierarchy.cs

+ 2
- 2
src/Discord.Net.Interactions/Utilities/CommandHierarchy.cs View File

@@ -26,7 +26,7 @@ namespace Discord.Interactions
public static IList<string> GetCommandPath(this ICommandInfo commandInfo) public static IList<string> GetCommandPath(this ICommandInfo commandInfo)
{ {
if (commandInfo.IgnoreGroupNames) if (commandInfo.IgnoreGroupNames)
return new string[] { commandInfo.Name };
return new List<string> { commandInfo.Name };


var path = commandInfo.Module.GetModulePath(); var path = commandInfo.Module.GetModulePath();
path.Add(commandInfo.Name); path.Add(commandInfo.Name);
@@ -48,6 +48,6 @@ namespace Discord.Interactions
} }


public static IList<string> GetTypePath(Type type) => public static IList<string> GetTypePath(Type type) =>
new string[] { EscapeChar + type.FullName };
new List<string> { EscapeChar + type.FullName };
} }
} }

Loading…
Cancel
Save