show when stats are requested
This commit is contained in:
@@ -73,10 +73,12 @@ class Bot {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (interaction.isCommand()) {
|
if (interaction.isCommand()) {
|
||||||
// Send immediate acknowledgment
|
// Remove ephemeral flag for finduser and matchhistory commands
|
||||||
await interaction.deferReply({ ephemeral: true });
|
const isStatsCommand = ['finduser', 'matchhistory'].includes(interaction.commandName);
|
||||||
|
await interaction.deferReply({
|
||||||
|
ephemeral: !isStatsCommand
|
||||||
|
});
|
||||||
|
|
||||||
// Process command asynchronously
|
|
||||||
this.logger.debug('Processing command', {
|
this.logger.debug('Processing command', {
|
||||||
command: interaction.commandName,
|
command: interaction.commandName,
|
||||||
guild: interaction.guild?.name,
|
guild: interaction.guild?.name,
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ class CommandHandler {
|
|||||||
if (!userData || !userData.success) {
|
if (!userData || !userData.success) {
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
content: '❌ User not found or an error occurred while fetching data.',
|
content: '❌ User not found or an error occurred while fetching data.',
|
||||||
ephemeral: true
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -167,7 +166,6 @@ class CommandHandler {
|
|||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('Error in handleFindUser:', {
|
this.logger.error('Error in handleFindUser:', {
|
||||||
@@ -188,7 +186,6 @@ class CommandHandler {
|
|||||||
if (!userData || !userData.success) {
|
if (!userData || !userData.success) {
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
content: '❌ User not found or an error occurred while fetching data.',
|
content: '❌ User not found or an error occurred while fetching data.',
|
||||||
ephemeral: true
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -209,7 +206,6 @@ class CommandHandler {
|
|||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('Error in handleMatchHistory:', {
|
this.logger.error('Error in handleMatchHistory:', {
|
||||||
|
|||||||
Reference in New Issue
Block a user