MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / execute

Function execute

src/commands/Utility/wipedata.js:14–55  ·  view source on GitHub ↗
(interaction, guildConfig, client)

Source from the content-addressed store, hash-verified

12 .setDescription('Delete all your personal data from the bot (irreversible)'),
13
14 async execute(interaction, guildConfig, client) {
15 try {
16 const warningMessage =
17 `⚠️ **THIS ACTION IS IRREVERSIBLE!** ⚠️\n\n` +
18 `This will permanently delete **ALL** your data from this server including:\n` +
19 `• 💰 Economy balance (wallet & bank)\n` +
20 `• 📊 Levels and XP\n` +
21 `• 🎒 Inventory items\n` +
22 `• 🛍️ Shop purchases\n` +
23 `• 🎂 Birthday information\n` +
24 `• 🔢 Counter data\n` +
25 `• 📋 All other personal data\n\n` +
26 `**This cannot be undone. Are you absolutely sure?**`;
27
28 const embed = warningEmbed('Wipe All Data', warningMessage);
29
30 const confirmButtons = getConfirmationButtons('wipedata');
31
32 await InteractionHelper.safeReply(interaction, {
33 embeds: [embed],
34 components: [confirmButtons],
35 flags: MessageFlags.Ephemeral
36 });
37
38 logger.info(`Wipedata command executed - confirmation prompt shown`, {
39 userId: interaction.user.id,
40 guildId: interaction.guildId
41 });
42 } catch (error) {
43 logger.error(`Wipedata command execution failed`, {
44 error: error.message,
45 stack: error.stack,
46 userId: interaction.user.id,
47 guildId: interaction.guildId,
48 commandName: 'wipedata'
49 });
50 await handleInteractionError(interaction, error, {
51 commandName: 'wipedata',
52 source: 'wipedata_command'
53 });
54 }
55 }
56};

Callers

nothing calls this directly

Calls 4

warningEmbedFunction · 0.90
getConfirmationButtonsFunction · 0.90
handleInteractionErrorFunction · 0.90
safeReplyMethod · 0.80

Tested by

no test coverage detected