mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 15:57:42 +02:00
Sort by name in help/gen commands
This commit is contained in:
@@ -17,7 +17,9 @@ module.exports = class GenerateCommandsCommand extends Command {
|
||||
async run(msg) {
|
||||
const list = this.client.registry.groups
|
||||
.map(g => {
|
||||
const commands = g.commands.filter(c => !c.hidden && !c.ownerOnly);
|
||||
const commands = g.commands
|
||||
.filter(c => !c.hidden && !c.ownerOnly)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
if (!commands.size) return null;
|
||||
const mapped = commands.map(c => {
|
||||
const nsfw = c.nsfw ? ` (NSFW)` : '';
|
||||
|
||||
@@ -20,7 +20,9 @@ module.exports = class GenerateCreditCommand extends Command {
|
||||
const npm = `* ${deps.map(dep => `[${dep}](https://www.npmjs.com/package/${dep})`).join('\n* ')}`;
|
||||
const list = this.client.registry.groups
|
||||
.map(g => {
|
||||
const commands = g.commands.filter(c => !c.hidden && !c.ownerOnly && c.credit.length - 1 !== 0);
|
||||
const commands = g.commands
|
||||
.filter(c => !c.hidden && !c.ownerOnly && c.credit.length - 1 !== 0)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
if (!commands.size) return null;
|
||||
return commands.map(c => {
|
||||
const credits = c.credit
|
||||
|
||||
Reference in New Issue
Block a user