mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
oi
This commit is contained in:
parent
72dddcc02d
commit
1a3d9e2193
1 changed files with 3 additions and 3 deletions
|
@ -130,13 +130,13 @@ class Help extends BaseCommand {
|
||||||
async autocompleteRun(client, interaction) {
|
async autocompleteRun(client, interaction) {
|
||||||
const command = interaction.options.getString("command"),
|
const command = interaction.options.getString("command"),
|
||||||
commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()],
|
commands = [...new Map(client.commands.map(v => [v.constructor.name, v])).values()],
|
||||||
results = commands.filter(c => c.name.includes(command));
|
results = commands.filter(c => c.command.name.includes(command));
|
||||||
console.log(commands);
|
console.log(commands);
|
||||||
|
|
||||||
return interaction.respond(
|
return interaction.respond(
|
||||||
results.slice(0, 25).map(command => ({
|
results.slice(0, 25).map(command => ({
|
||||||
name: command.name,
|
name: command.command.name,
|
||||||
value: command.name,
|
value: command.command.name,
|
||||||
}),
|
}),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue