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.
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 :)