Return a list instead of an array (#2451)

This commit is contained in:
Damian Kraaijeveld
2022-09-02 23:04:53 +02:00
committed by GitHub
parent 370bdfa3c6
commit 376a812b6a

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