mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Fix
This commit is contained in:
@@ -18,14 +18,14 @@ module.exports = class GenerateCreditCommand extends Command {
|
|||||||
const credit = [];
|
const credit = [];
|
||||||
const commands = this.client.registry.commands.filter(cmd => cmd.credit && cmd.credit.length > 1);
|
const commands = this.client.registry.commands.filter(cmd => cmd.credit && cmd.credit.length > 1);
|
||||||
for (const command of commands.values()) {
|
for (const command of commands.values()) {
|
||||||
for (const credit of command.credit) {
|
for (const cred of command.credit) {
|
||||||
const found = credit.find(c => c.name === credit.name);
|
const found = credit.find(c => c.name === cred.name);
|
||||||
if (found) {
|
if (found) {
|
||||||
found.commands.push(command.name);
|
found.commands.push(command.name);
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if (credit.name === 'Dragon Fire') continue;
|
if (cred.name === 'Dragon Fire') continue;
|
||||||
credit.push({ ...credit, commands: [command.name] });
|
credit.push({ ...cred, commands: [command.name] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const mapped = credit.map(c => `- [${c.name}](${c.url})\n${c.commands.map(cmd => ` * ${cmd}`).join('\n')}`);
|
const mapped = credit.map(c => `- [${c.name}](${c.url})\n${c.commands.map(cmd => ` * ${cmd}`).join('\n')}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user