feat: update interaction replies to use flags for improved visibility
This commit is contained in:
@@ -154,13 +154,14 @@ async function handleDemoInteractions(demoMessage: Message, originalMessage: Mes
|
|||||||
filter: (interaction: MessageComponentInteraction) => interaction.user.id === originalMessage.author.id
|
filter: (interaction: MessageComponentInteraction) => interaction.user.id === originalMessage.author.id
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("collect", async (interaction: ButtonInteraction) => {
|
collector.on("collect", async (interaction: MessageComponentInteraction) => {
|
||||||
try {
|
try {
|
||||||
|
if (interaction.isButton()) {
|
||||||
switch (interaction.customId) {
|
switch (interaction.customId) {
|
||||||
case "quick_action":
|
case "quick_action":
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
content: "⚡ **Acción Rápida Ejecutada!**\n\nEste botón estaba como accesorio en una sección.",
|
content: "⚡ **Acción Rápida Ejecutada!**\n\nEste botón estaba como accesorio en una sección.",
|
||||||
ephemeral: true
|
flags: 64
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -189,12 +190,13 @@ async function handleDemoInteractions(demoMessage: Message, originalMessage: Mes
|
|||||||
await handleStyleButtons(interaction);
|
await handleStyleButtons(interaction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error handling demo interaction:", error);
|
console.error("Error handling demo interaction:", error);
|
||||||
if (!interaction.replied && !interaction.deferred) {
|
if (!interaction.replied && !interaction.deferred) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
content: "❌ Ocurrió un error al procesar la interacción.",
|
content: "❌ Ocurrió un error al procesar la interacción.",
|
||||||
ephemeral: true
|
flags: 64
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,7 +413,7 @@ async function handleStyleButtons(interaction: ButtonInteraction): Promise<void>
|
|||||||
if (styleName) {
|
if (styleName) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
content: `🎯 **Botón ${styleName} activado!**\n\nEste botón era un accesorio de una sección.`,
|
content: `🎯 **Botón ${styleName} activado!**\n\nEste botón era un accesorio de una sección.`,
|
||||||
ephemeral: true
|
flags: 64
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user