Refactor ephemeral message handling in ticket interactions

- Updated ticket command and interaction responses to utilize the new `ephemeral()` function for consistent ephemeral message handling.
- Enhanced error handling for member fetching in ticket interactions, ensuring proper responses when members are not found.
- Improved localization for new error messages related to member presence in ticket commands.
- Documented changes in phase tracking to reflect updates in ticket interaction responses.
This commit is contained in:
TheOnlyMace
2026-07-25 16:32:30 +02:00
parent b5bf214d7f
commit 5f932f5d63
7 changed files with 118 additions and 30 deletions

View File

@@ -10,6 +10,7 @@ import type {
import { decodeComponentCustomId, t, type DashboardModuleId } from '@nexumi/shared';
import { env } from './env.js';
import { getGuildLocale } from './i18n.js';
import { ephemeral } from './interaction-reply.js';
import { isModuleEnabled, moduleForComponent } from './module-gates.js';
import { isMaintenanceMode } from './presence.js';
import type { BotContext } from './types.js';
@@ -176,7 +177,7 @@ export async function routeComponentInteraction(
if (!interaction.replied && !interaction.deferred) {
await interaction.reply({
content: maintenance.message?.trim() || t(locale, 'generic.maintenance'),
ephemeral: true
...ephemeral()
});
}
return true;
@@ -198,7 +199,7 @@ export async function routeComponentInteraction(
if (!interaction.replied && !interaction.deferred) {
await interaction.reply({
content: t(locale, 'generic.moduleDisabled'),
ephemeral: true
...ephemeral()
});
}
return true;