(interaction)
| 49 | ], |
| 50 | |
| 51 | async execute(interaction) { |
| 52 | try { |
| 53 | if (!interaction.member.permissions.has(PermissionFlagsBits.ManageGuild)) { |
| 54 | return interaction.reply({ |
| 55 | content: '❌ You need **Manage Server** permissions to use this.', |
| 56 | ephemeral: true, |
| 57 | }); |
| 58 | } |
| 59 | |
| 60 | if (interaction.customId === 'log_dash_refresh') { |
| 61 | return handleRefresh(interaction); |
| 62 | } |
| 63 | |
| 64 | if (interaction.customId === 'log_dash_back') { |
| 65 | return handleBackToMain(interaction); |
| 66 | } |
| 67 | |
| 68 | if (interaction.customId === 'log_dash_remove_filter') { |
| 69 | return handleRemoveFilterModal(interaction); |
| 70 | } |
| 71 | |
| 72 | if (interaction.customId.startsWith('log_dash_add_filter:')) { |
| 73 | return handleAddFilterModal(interaction); |
| 74 | } |
| 75 | |
| 76 | if (interaction.customId.startsWith('log_dash_toggle')) { |
| 77 | return handleToggle(interaction); |
| 78 | } |
| 79 | } catch (error) { |
| 80 | logger.error('Error in logging button handler:', error); |
| 81 | await interaction.reply({ |
| 82 | content: '❌ An error occurred while processing your request.', |
| 83 | ephemeral: true, |
| 84 | }).catch(() => {}); |
| 85 | } |
| 86 | }, |
| 87 | }; |
| 88 | |
| 89 | async function handleRefresh(interaction) { |
nothing calls this directly
no test coverage detected