Skip to content

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