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

Function getProtectionKey

src/utils/abuseProtection.js:74–78  ·  view source on GitHub ↗
(interaction, commandName)

Source from the content-addressed store, hash-verified

72}
73
74function 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
80function recordBlockedAttempt(key, commandName, interaction, command, remainingMs) {
81 const now = Date.now();

Callers 1

enforceAbuseProtectionFunction · 0.85

Calls 1

normalizeCommandNameFunction · 0.85

Tested by

no test coverage detected