interaction.reply and web3 library issue

I receive an error during interaction.reply .
I use discord.js (ver. 13.16) and web3 library to send transaction from one account to another and transaction is passed, but after doing it my bot turn off and show me an error:
\node_modules\discord.js\src\rest\RequestHandler.js:350
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Unknown interaction


this is code what I use:

if (availableQuantity >= quantity) {
  async function withdrawBNB(wallet, quantity) {
    // ...
    // Transaction logic using web3
    // ...
  };
    withdrawBNB(wallet, quantity)
    .then((response) => {
      interaction.reply(`You have successfully withdrawn ${quantity} ${cryptoName} to wallet ${wallet}. TxHash: ${response.txHash}`);
      })
      .catch((error) => {
      console.error(error);
      interaction.reply('Failed to withdraw BNB. Please try again later.');
      });
}
Was this page helpful?