Skip to content

ScamBlocker doesn't scan edited messages, allowing scam #1516

Description

@KonstantineVashalomidze

Describe the bug
ScamBlocker only checks messages when they are first sent (onMessageReceived), but not when they are edited (onMessageUpdated). This means a user can send a clean message nd then edit it to conain scam content, bypassing detection entirely.

Expected behavior
Edited messages should be scanned the same way new messages are. (They should be deleted and reported)

To Reproduce
For example type @everyone $ in any channel, we expect this to be deleted which gets deleted correctly since corresponding combination is considered as scam. Now type for example Meow and then edit it to Meow -> @everyone $. It is not getting deleted.

Screenshots

Image

NOTE: This is my test discord server not ours.

Additional context
The one possible solution is to override onMessageUpdated in ScamBlocker and run the same scam detection logic (as in onMessageReceived) on the edited message content.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions