optional parameter to pass focused value

This commit is contained in:
Baipyrus 2024-04-05 11:33:13 +02:00
parent 03fd826952
commit 1d5d22dd5f

View File

@ -251,11 +251,11 @@ async function infoResponse(interaction) {
}
/** @param {AutocompleteInteraction} interaction */
async function keywordAutocomplete(interaction) {
async function keywordAutocomplete(interaction, focused) {
const { options, guildId } = interaction;
// Get command options
const focused = options.getFocused();
if (!focused) focused = options.getFocused();
// Get list of keywords from database
/** @type {import('../../models/keywords.js').Keyword[]} */