awaitMessageComponent method on InteractionResponse

When sending a reply containing a component row, the returned value is an InteractionResponse which contains and awaitMessageComponent method. I would assume this method would collect the user input of the component sent that returned this InteractionResponse, however it always seems to fail yet placing a message collector on the channel gets the user input I expected.

Is putting the collector on the channel just the intended way of getting the response on the component I send or am I doing something wrong?

const response = await submition.reply({ components: [ selectMenuComponent ]})

const selected = response.awaitMessageComponent({
    filter: (i) => {
      i.deferUpdate()
      return i.user.id === response.interaction.user.id
    },
    time: 120_000,
    componentType: ComponentType.SelectMenu
  })
Was this page helpful?