From 275449408302003ac78af774af078860837e8fe7 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 24 Mar 2024 09:55:45 -0400 Subject: [PATCH] #16 changed where the map was done for leave AC --- server/discordBot/commands/leave.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/discordBot/commands/leave.mjs b/server/discordBot/commands/leave.mjs index 996fa58..978d431 100644 --- a/server/discordBot/commands/leave.mjs +++ b/server/discordBot/commands/leave.mjs @@ -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);