client.on("interactionCreate", async interaction => {
const split = interaction.customId.split("_");
const final = split[1];
if (interaction.customId === split[0]) {
const buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel("Begrüßen")
.setStyle("PRIMARY")
.setCustomId(`customid`)
.setEmoji("👋")
);
await interaction.update({ components: [buttons] });
interaction.ack();
interaction.followUp(`**${interaction.user.username}** begrüßt **${final}**`)
}
})
client.on("interactionCreate", async interaction => {
const split = interaction.customId.split("_");
const final = split[1];
if (interaction.customId === split[0]) {
const buttons = new MessageActionRow()
.addComponents(
new MessageButton()
.setLabel("Begrüßen")
.setStyle("PRIMARY")
.setCustomId(`customid`)
.setEmoji("👋")
);
await interaction.update({ components: [buttons] });
interaction.ack();
interaction.followUp(`**${interaction.user.username}** begrüßt **${final}**`)
}
})