Open alexjack32 opened 2 years ago
Hi, I had the same problem and I changed ButtonInteraction to MessageComponentInteraction
const filter = (btnInt: MessageComponentInteraction) => {
return msgInt.user.id === btnInt.user.id
}
const collector = channel.createMessageComponentCollector({
filter,
max: 1,
time: 1000 * 15
})
collector.on('collect', (i: MessageComponentInteraction) => {
i.reply({
content: 'You clicked a button',
ephemeral: true
})
})```
import { ButtonInteraction, MessageActionRow, MessageButton} from "discord.js"; import { ICommand } from "wokcommands";
export default { category: 'Testing', description: 'Testing',
slash: true, testOnly: true,
callback: async ({ interaction: msgInt, channel }) => { const row = new MessageActionRow() .addComponents( new MessageButton() .setCustomId('ban_yes') .setEmoji('👼🏾') .setLabel('confirm') .setStyle('SUCCESS') )
filter, // here it gives and error for the filter max: 1, time: 1000 * 15 }) // here it gives and error for the filter![Screenshot 2021-11-15 145442](https://user-images.githubusercontent.com/80642316/141845356-665e09a7-0cbb-4ed3-a0aa-a648be3d328c.jpg)
}, } as ICommand