#16 changed where the map was done for leave AC

This commit is contained in:
Logan Cusano
2024-03-24 09:55:45 -04:00
parent e62be27f74
commit 2754494083

View File

@@ -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);