(interaction, commandName)
| 72 | } |
| 73 | |
| 74 | function getProtectionKey(interaction, commandName) { |
| 75 | const guildScope = interaction.guildId || 'dm'; |
| 76 | const userId = interaction.user?.id || 'unknown_user'; |
| 77 | return `${guildScope}:${userId}:${normalizeCommandName(commandName)}`; |
| 78 | } |
| 79 | |
| 80 | function recordBlockedAttempt(key, commandName, interaction, command, remainingMs) { |
| 81 | const now = Date.now(); |
no test coverage detected