mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-06-28 16:59:58 +03:00
26 lines
600 B
JavaScript
26 lines
600 B
JavaScript
const { Autocompleter } = require('@eartharoid/dbf');
|
|
|
|
module.exports = class ReferencesCompleter extends Autocompleter {
|
|
constructor(client, options) {
|
|
super(client, {
|
|
...options,
|
|
id: 'references',
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @param {*} comamnd
|
|
* @param {import("discord.js").AutocompleteInteraction} interaction
|
|
*/
|
|
async run(value, comamnd, interaction) {
|
|
await interaction.respond(
|
|
await this.client.autocomplete.components.get('ticket').getOptions(value, {
|
|
guildId: interaction.guild.id,
|
|
open: false,
|
|
userId: interaction.user.id,
|
|
}),
|
|
);
|
|
}
|
|
}; |