Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crosspost detection #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

codingJWilliams
Copy link
Contributor

A cache of the most recent 10 (configurable) messages is stored in an array. When a user posts their message content is compared to this cache and if they have posted an identical message in a different channel, the bot will reply linking to the original message.

The idea of this is so that for those trying to help a Luckperms user, effort isn't duplicated by two people simeultaneously helping the same person across two channels.

Only messages that are over 50 characters and that are sent to a channel defined in the .env file are counted. This is to ensure that small messages like "ok" and "hi" etc aren't warned for crossposting, only large help messages etc. Empty messages (IE images, embeds, etc) are also included.

Any thoughts welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants