#help please (CombinedPropertyError)

1 messages · Page 1 of 1 (latest)

winged glade
#

Hello!

I have a problem so my code is giving me multiple CombinedPropertyError idk whats that but I used some async functions to get the descriptions to give to my embed

export async function handleWhatIsCommand(interaction) {
  const tank = interaction.options.get("tank").value;
  const designText = await getAllInfoThenGetText(tank, 'Design')
  const technicalText = await getAllInfoThenGetText(tank, 'Technical')
...

  embedTemplate.addFields(
      {
        name: "Design",
        value: designText
      },
      {
        name: "Technical",
        value: technicalText
      }
    );

and the getAllInfoFrom<wiki>API uses JSDOM (an npm package that can like make a fake dom, need to use it to get the text content from mediawiki apI)

maybe that npm is doing something idk

but when i tried using it in here

async function main() {
  const commands = [whatis];

  try {
    console.log("Started refreshing application (/) commands.");
    await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), {
      body: commands,
    });
    // -------------------
    let test = getAllInfoThenGetText(someparamshere........)
    console.log(test)
    // -------------------
    client.login(BOT_TOKEN);
  } catch (error) {
    console.error(error);
  }
}

main();

it outputted the data to the terminal console just fine

compact prawn