#Button interaction doesn't work
3 messages · Page 1 of 1 (latest)
const collectorFilter = i => i.user.id === interaction.user.id;
try {
const confirmation = await response.awaitMessageComponent({ filter: collectorFilter, time: 60_000 });
if (confirmation.customId === 'potwierdzeniethx') {
await confirmation.update({ content: `${user} has been banned for reason:`, components: [] });
} else if (confirmation.customId === 'odrzuceniethx') {
await confirmation.update({ content: 'Action cancelled', components: [] });
}
} catch (e) {
await response.editReply({ content: 'Confirmation not received within 1 minute, cancelling', components: [] });
}
},
};```