#unknown message when trying to edit the interaction

2 messages · Page 1 of 1 (latest)

turbid quiver
#
export async function interactionCreate(
  client: IGClient,
  interaction: BaseInteraction
): Promise<any> {
  if (interaction.isButton()) {
  if (interaction.customId == 'accept-tos') {
        await interaction.message.edit({
          embeds: [
            CreateEmptyEmbed(EmbedColor.FAILURE, {
              title: 'foobar',
              description: 'foobar'
            })
          ]
        });
    }
  }

Hey. I'm unsure why, but I'm getting an unknown message error when trying to edit the message which the button is attached to. The message is an ephemeral message which is sent when my user types a / command, and has buttons attached to it, when the button is clicked, I want to edit the message.

When console logging interaction.message the object does exist, so im not sure why it says it is unknown.

proud cairn
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.