-
-
Notifications
You must be signed in to change notification settings - Fork 46
Adds ping-protection module. #168
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
base: beta-discordjs14
Are you sure you want to change the base?
Conversation
…w file for correct tracking.
… advanced configuration in moderation.json and made the choices inside depend on it because I forgot to :/ Added the options to enable/disable pings/modlogs/logs kept after leave and made the choices depend on it + made those choices with numbers select instead of integers for almost 0 user-error issues.
…ded into the message editor for the warning message
…o debug code, has been tested and is currently ongoing extensive testing to ensure absolutely everythig works as supposed to
…lish while remaining the same functions. Removed a few locales that are unused and updated some locales for better understanding. Fully tested extensively. Not verified by GitHub because I code in VSCode.
…asic pings count config
Listed the warnings for all commands except the panel command as the bot already checks for administrator perms.
|
By the way to maybe answer some questions you may have:
Just in case you were wondering any of the above, then you have the answers ^^ |
SCDerox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Without testing your code, I was able to identify multiple issues that need to be addressed - feel free to comment on them if you disagree.
Additionally:
- Pings still go through, meaning that users still recive the pings "protected" by this module. This means that this module does not prevent pings, instead it punishes them. Instead of doing this, the module should create and maintain an Auto Mod Rule and react to the autoModerationActionExecution event when the rule gets triggered to run punishments.
If you have any questions, concerns or disagree with any of my comments, please reply to them directly or let me know!
Happy holidays!
|
Thanks for the requested changes! I will immediately work on resolving these, for ones that I have questions about I let them as a reply. |
|
Hey Simon, I have completed the changes requested. I think most (if not all) of your changes have been done, but it's been many hours so I can't remember if I did exactly all. Please let me know if everything has been solved now! |
SCDerox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Still not using automod APIs
- Please mark comments that you solved as "Resolved", otherwise I am unable to review the changes.
|
Alright, I just reviewed all changes and I did everything except indeed the automod API which I forgot, I will be working on that now! |
|
You could also add the automod feature as a configurable option, but I think to truly "protect" against pings, we need to actually be able to block them. This would make the module way more powerful 😄 |
|
To get access to the channel, use [event].channelId (which needs to be fechted), to get access to the content, use [event].content |
|
Ahhh okay noted. Though I removed it not only because I didn't get it to work, also because the alert message already shows the content to the protected people/people with the protected role meaning doing both a repost and sending the alert is basically double double. I have sent the full code of the bot now that works as supposed to! |
…imit reached with reply pings even when it's allowed in config
|
Hi, i've found a quite critical bug when testing extensively today for Quality Assurance.
Please review the full code with soon if you haven't already ^^ |
Added from my ping protection branch
|
Hey, I was bored and made it that instead of sending a warning message when a protected user pings themselves, that it will send a little meme and a chance to get a secret one |
…for days instead of weeks in the now renamed "useCustomTimeframe" instead of "advancedConfiguration"
|
Hey, i've done some QOL improvements, which include all the following changes:
I have tested this thoroughly since yesterday to make sure every feature works and for me it works as supposed to with no bugs ^^ |
|
Hi, I've made a few changes I just came up with today thst I have no idea how I missed those features earlier:
I think that's about it ^^ |
|
Whoops I accidentally made the logic opposite ways 😬, fixed it though github is annoying and made me make 2 commits for 2 files changes |
SCDerox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While reviewing this code, I have noticed some things, please address them 😄
As you might know, we're working on upgrading to the latest discord.js version. If you want, we can push the updated core and some modules to another branch and you can adjust your module to work with the latest version. This would allow us to accelerate your module availability on SCNX, since there's no need for us to manually upgrade it to the latest discord.js version.
Additionally, please disclose the following:
- Please disclose whether Generative Large Language Models ("Generative AI", e.g. Coplilot) were used and to what extent to write this code. In addition, please confirm that you have reviewed and tested any generated code thoroughly. For details, please review our AI Policy.
|
Hey Simon, Thanks for the review! |
|
Disclosing how AI used as a comment here is fine or you can add it to your original PR body, no need to add it into the files themselves. |
|
The branch is now available: beta-discordjs14. Please switch the base branch of this PR to that branch. |
|
Hey Simon, i've addressed your feedback which you can see in my ping-protection module branch. I have not yet put itto the main branch here as I am currently working on adjusting the code to DJS V14, but in the meantime if you want to you can look there but after I changed the code to DJS V14 it will show up here anyway ^^ |
|
Alrighty, after alot of testing and things breaking, the Ping Protection module is finally done in Discord.JS V14, with very slight logic changes because of it (such as using .toJSON for actionRows etc because Discord.JS V14 basically requires it now) |
|
I've also upgraded readability for the eyes in some files that I forgot earlier, I hope that helps aswell |
A full module dedicated to protecting specific users/roles for future pings!
Features:
Maybe even more features that I forgot to mention here lol
This module has been extensively tested by me and my testers over a 3 day period going over every feature, including after a full code polish. Changes may look longer/shorter in duration between them because I only commit changes once tested it works.
About AI Usage: