|
|
import { SlashCommand } from './SlashCommand.js'; |
|
|
import { AutoCompleteOption } from '../autocomplete/AutoCompleteOption.js'; |
|
|
|
|
|
export class SlashCommandCommandAutoCompleteOption extends AutoCompleteOption { |
|
|
command; |
|
|
|
|
|
|
|
|
get value() { |
|
|
return this.command; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
} |
|
|
} |
|
|
|