TheOdinProject / odin-bot-v2

The bot that breathes life into our Discord community
ISC License
47 stars 72 forks source link

Context menu button, Ban Spammer #548

Open Mclilzee opened 2 weeks ago

Mclilzee commented 2 weeks ago

Because

Phishing links spam is an ever-increasing occurrence on discord. The mod team have to keep banning these users with the same message so that they know how to contact us if they wish to rejoin the server.

This PR will automate that with a click of a button.

This PR

Issue

Closes #504

Additional Information

Make sure to change the config.js moderationLog ID to the channel ID of your test server to see the log messages while testing.

There are currently some duplication of functions in some of the other services, I think it would be a good idea to move those to utils. Another duplication happen is with the tests, There is a buildInteraction function in test utils but that one is made for a specific purpose only, I would need to change it and refactor all the tests that calls it in order to generalize it to be used by these new tests. I didn't want this PR to be too big and include those refactors. So I included some create interaction mocks functions in the test files.

Let me know how would you like to proceed with the refactors.

Pull Request Requirements