Optimize Linq

Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
This commit is contained in:
Stargazing Koishi 2023-05-13 04:09:15 -07:00 committed by GitHub
parent 3d11d84d73
commit 51ecef73a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -530,8 +530,8 @@ namespace TShockAPI
var desc = descattr != null && !string.IsNullOrWhiteSpace(descattr.Description) ? descattr.Description : GetString("No description available.");
var strs = GetCommands(name).Select(c => c.Names.Count > 1
? $"{c.Name} ({string.Join(" ", c.Names.Skip(1).Select(n => $"/{n}"))})"
: c.Name);
? $"/{c.Name} (/{string.Join(" /", c.Names.Skip(1))})"
: $"/{c.Name}");
sb.AppendLine($"## {name}");
sb.AppendLine($"{desc}");