Cross-Channel Spam Filter with Perceptual Image Hashing #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Implements guild-wide duplicate message detection system with configurable rate limiting, exemption management, and automated moderation actions to combat spam across channels.
Problem Solved
Spammers repeatedly post identical content across multiple channels. Previous system had no cross-channel duplicate detection. Byte scrambling was used to evade simple checksum matching.
Implementation
Detection Capabilities:
Exemption System:
Automated Actions:
When threshold exceeded, executes in sequence:
Configuration:
Architecture
New Components:
Organizational Improvements:
Dependencies Added:
Testing
All functional requirements validated through manual testing in Discord server:
Detection:
Actions:
Configuration:
Exemptions:
Known Limitations
Perceptual hashing successfully detects byte scrambling and minor resizing, but does NOT detect severe aspect ratio changes (e.g., 16:9 → 1:1 crop). This is acceptable as spammers typically repost identical images or apply byte scrambling, not compositional edits.
Files Changed
New Files (7):
Modified Files (2):
Moved Files (1):
Total Changes: 10 files, 918 insertions, 4 deletions
Discord API Constraints Discovered
Future Enhancements
Planning Documentation: Available in project notes
Testing Evidence: Validated in AppCommunity Testbed server
Implementation Duration: ~1 day (2025-10-26 to 2025-10-27)