refactor: centralize custom interaction IDs into constants
Replace all hardcoded custom ID strings with module-level constants. Each module now has *_CUSTOM_IDS in its types file, using functions for dynamic IDs and PREFIX for startsWith matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
getCancelledEmbed
|
||||
} from "@/modules/moderation/prune.view";
|
||||
import { withCommandErrorHandling } from "@lib/commandUtils";
|
||||
import { PRUNE_CUSTOM_IDS } from "@modules/moderation/prune.types";
|
||||
|
||||
export const prune = createCommand({
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -83,7 +84,7 @@ export const prune = createCommand({
|
||||
time: 30000
|
||||
});
|
||||
|
||||
if (confirmation.customId === "cancel_prune") {
|
||||
if (confirmation.customId === PRUNE_CUSTOM_IDS.CANCEL) {
|
||||
await confirmation.update({
|
||||
embeds: [getCancelledEmbed()],
|
||||
components: []
|
||||
|
||||
Reference in New Issue
Block a user