#16 changed where the map was done for leave AC
This commit is contained in:
@@ -23,9 +23,9 @@ export const deferInitialReply = true;
|
||||
*/
|
||||
export async function autocomplete(nodeIo, interaction) {
|
||||
const focusedValue = interaction.options.getFocused();
|
||||
const choices = (await checkOnlineBotsInGuild(nodeIo, interaction.guild.id)).map(choice => choice = {name, value: choice.nuid});
|
||||
const choices = (await checkOnlineBotsInGuild(nodeIo, interaction.guild.id));
|
||||
|
||||
const filtered = choices.filter(choice => choice.name.startsWith(focusedValue));
|
||||
const filtered = choices.filter(choice => choice.name.startsWith(focusedValue)).map(choice => choice = {name: choice.name, value: choice.nuid});
|
||||
|
||||
console.log(focusedValue, choices, filtered);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user