Spaces:
Running
Running
File size: 788 Bytes
b82d373 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import { SlashCommand } from './SlashCommand.js';
import { AutoCompleteOption } from '../autocomplete/AutoCompleteOption.js';
export class SlashCommandCommandAutoCompleteOption extends AutoCompleteOption {
/**@type {SlashCommand}*/ command;
get value() {
return this.command;
}
/**
* @param {SlashCommand} command
* @param {string} name
*/
constructor(command, name) {
super(name);
this.command = command;
}
renderItem() {
let li;
li = this.command.renderHelpItem(this.name);
li.setAttribute('data-name', this.name);
li.setAttribute('data-option-type', 'command');
return li;
}
renderDetails() {
return this.command.renderHelpDetails(this.name);
}
}
|