Open alexjack32 opened 3 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
}, } as ICommand