user24636442
user24636442

Reputation: 1

TypeError: report_message.awaitMessageComponent is not a function

const report_message = interaction.guild.channels.cache.get('1230849852024557638').send({content:"Nieuwe Report!", embeds: [embed], components: button_row}); const report_filter = (interaction_filter) => {return true;}

try { const confirmation = await report_message.awaitMessageComponent({ filter: report_filter, time: "60000000000000000000000000000000000000000000000"})

I am stuck on this, i want it to work

Upvotes: -3

Views: 53

Answers (1)

why u need it
why u need it

Reputation: 1

Channel.Send() returns a promise, not a message. You should use await instead. Also don't use filter if you are going to always return true.

const channel = interaction.guild.channels.cache.get('1230849852024557638');
const report_message = await channel.send({content:"Nieuwe Report!", embeds: [embed], components: button_row});

const confirmation = await report_message.awaitMessageComponent({time:6000000})

Upvotes: 0

Related Questions