Ping Protection V1.1#171
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.
…s supposed to with SCNX.
…efault with the message content and allows to configure both options
…ge to the automod message block. Also the bot now deletes the rule it created if automod enabled = false
…imit reached with reply pings even when it's allowed in config
Added from my ping protection branch
…for days instead of weeks in the now renamed "useCustomTimeframe" instead of "advancedConfiguration"
|
I noticed a few things I’d like to share regarding the module:
|
|
Hi Fridolin, |
|
Hi, thank you for your quick response. I think we should ask @SCDerox for the second question^^ |
|
Thanks for your valuable feedback, Fridolin. I, personally, have no issues with the limit. But based on your feedback, there's no technical reason that requires a limit. So making it adjustable and allowing users to disable it might be a compromise that both sides could agree on. |
|
I think I might just increase the limit to 2 years (48 months) and if we get any feedback from users for it to be longer then ig I can make it unlimited. But I agree with both 😅 |
|
Alrighty, I have now set the pings history limit to 2 years (I actually relaized it was only 6 months max, that was indeed short). Additionally, I removed the pings count thing for the custom timeframe as that's basically useless, it now uses the standard one, which is now also renamed to pingsCount without the Basic. |
|
Sorry, I forgot you were talking about moderation log |
|
Hi, I quickly added the category feature in the configuration.json and storage.json config files to make it look more sleek ^^ |
|
Thanks to Simon who provided me the list of emoji's that actually work in the dashboard, I adjusted it to use supported ones ^^ |
|
Hi, thanks so much for your contribution - quick update: Unfortunately I have exams this week, so it might take a few weeks to review everything. Thanks so much for your patience. |
There was a problem hiding this comment.
Pull request overview
Updates the Ping Protection module’s configuration/UI text and fixes a missing “whitelisted users” display, while also adjusting some retention/default messaging behavior.
Changes:
- Add config UI grouping metadata (categories) to ping-protection configuration/storage config definitions.
- Fix
/ping-protection list whitelistedto include whitelisted users and update related locale keys/strings. - Simplify moderation trigger configuration (merge basic/advanced ping-count fields) and update the moderation evaluation logic accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/ping-protection/ping-protection.js | Updates deletion log locale key, changes mod-log retention fallback, and simplifies moderation trigger count handling. |
| modules/ping-protection/events/interactionCreate.js | Updates modal success reply locale key for data deletion. |
| modules/ping-protection/configs/storage.json | Adds config categories and updates retention bounds/defaults; includes the ping-history wipe toggle definition. |
| modules/ping-protection/configs/moderation.json | Renames/removes ping-count fields for moderation rules (schema change). |
| modules/ping-protection/configs/configuration.json | Adds config categories and shortens the default AutoMod block message. |
| modules/ping-protection/commands/ping-protection.js | Updates embed field locale keys and adds whitelisted users to the list output. |
| locales/en.json | Renames/adds locale keys and updates descriptions/titles for the list and modal messages. |
Comments suppressed due to low confidence (2)
modules/ping-protection/configs/moderation.json:29
- Renaming
pingsCountBasictopingsCount(and removingpingsCountAdvanced) is a breaking change for existingmoderation.jsonconfig elements. The config loader only copies fields by name, so existing rule thresholds will be dropped and replaced with defaults on next startup/reload. Consider adding a migration (e.g., map old keys to the new one) or keeping legacy fields temporarily to preserve user configuration.
{
"name": "pingsCount",
"humanName": {
"en": "Pings to trigger moderation"
},
"description": {
"en": "The amount of pings required to trigger a moderation action."
},
"type": "integer",
"default": {
"en": 10
}
},
modules/ping-protection/configs/storage.json:72
- The field is named
deleteAllPingHistoryAfterTimeframe, butenforceRetention()checksstorageConfig.DeleteAllPingHistoryAfterTimeframe(capitalD). With the current mismatch, this toggle will never take effect and the code will always run the non-wipe branch. Align the property name in code/config so the setting actually works.
"name": "deleteAllPingHistoryAfterTimeframe",
"category": "pings",
"humanName": {
"en": "Delete all the pings in history after the timeframe?"
},
"description": {
"en": "If enabled, the bot will delete ALL the pings history of an user after the timeframe instead of only the ping(s) exceeding the timeframe in the history."
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SCDerox
left a comment
There was a problem hiding this comment.
No issues from my side, please address the small thing copilot found and then re-request a review to get this merged 😄
|
I have done the suggested changes, I will quickly be testing the moderation rules to make sure it works with these changes, and then i'll commit it ^^ |
|
I have found no bugs during the (fairly) short testing period of moderation actions ^^ |
|
I also addressed the tab in the locales I forgot to do which was mentioned by Jan in his latest PR here ^^ |
* update to discord.js v14 * fixed missing strings * fixed broken info-commands * fixed duplicated entry * Adds ping-protection module. (#168) * Added the base module folders and module.json * Added all folders necessary and the configuration files for each folder * Added a test command * removed the manage file * Added, renamed and deleted some files as necessary and coded the models. * Renamed action.js to moderation.js, coded multiple things, added a new file for correct tracking. * Forgot to update module.json, now updated aswell * Added additional information in ping-protection.js * Disabled allowing reply pings, added the enable moderation and enable 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. * Added support for actually correct parameters and those parameters added into the message editor for the warning message * Added proper support for localization, and coded the events * Completed the full module and fixed some critical bugs that caused the bot to crash * Cleaned up some code notes I used for debugging * Completely finished the module and worked tirelessly for many hours to debug code, has been tested and is currently ongoing extensive testing to ensure absolutely everythig works as supposed to * Debugged absolutely everything, removed like 300 lines of code for polish 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. * Added the option to lower mod actions history * Made the deault value of pings to trigger action 10 instead of 5 in basic pings count config * Added the commands warnings for most commands Listed the warnings for all commands except the panel command as the bot already checks for administrator perms. * Almost completely rewrote the module to make sure the modules works as supposed to with SCNX. * Added "automod" abilities - Will now delete the original message by default with the message content and allows to configure both options * (not working correctly) added automod integration and some small changes * Fixed the * Removed the feature that didn't work (reposting), adds a custom message to the automod message block. Also the bot now deletes the rule it created if automod enabled = false * Fixed the bug of the bot still sending the warning and punishing if limit reached with reply pings even when it's allowed in config * Added a funny easter egg * Some QOL improvements, including merging the list commands * Added some new options in the config * Update configuration.json * Fix self-ping condition to allow self-pinging * Ping protection V1, in Discord.JS V14 * Ping Protection V1 * Changed code to the requested changes, and adjusted code logic to actually properly support multiple moderation actions (not tested before, and didn't work during testing) * Made adjustments to code as requested, and added an intent to main.js to make it work properly. * Fixed the missing footer on embeds. Fixed a small typo in the default waning message configuration and added an emoji to the why easter egg. --------- Co-authored-by: Kevinking500 <Kevinking500> * Ping Protection V1.1 (#171) * Added the base module folders and module.json * Added all folders necessary and the configuration files for each folder * Added a test command * removed the manage file * Added, renamed and deleted some files as necessary and coded the models. * Renamed action.js to moderation.js, coded multiple things, added a new file for correct tracking. * Forgot to update module.json, now updated aswell * Added additional information in ping-protection.js * Disabled allowing reply pings, added the enable moderation and enable 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. * Added support for actually correct parameters and those parameters added into the message editor for the warning message * Added proper support for localization, and coded the events * Completed the full module and fixed some critical bugs that caused the bot to crash * Cleaned up some code notes I used for debugging * Completely finished the module and worked tirelessly for many hours to debug code, has been tested and is currently ongoing extensive testing to ensure absolutely everythig works as supposed to * Debugged absolutely everything, removed like 300 lines of code for polish 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. * Added the option to lower mod actions history * Made the deault value of pings to trigger action 10 instead of 5 in basic pings count config * Added the commands warnings for most commands Listed the warnings for all commands except the panel command as the bot already checks for administrator perms. * Almost completely rewrote the module to make sure the modules works as supposed to with SCNX. * Added "automod" abilities - Will now delete the original message by default with the message content and allows to configure both options * (not working correctly) added automod integration and some small changes * Fixed the * Removed the feature that didn't work (reposting), adds a custom message to the automod message block. Also the bot now deletes the rule it created if automod enabled = false * Fixed the bug of the bot still sending the warning and punishing if limit reached with reply pings even when it's allowed in config * Added a funny easter egg * Some QOL improvements, including merging the list commands * Added some new options in the config * Update configuration.json * Fix self-ping condition to allow self-pinging * Ping protection V1, in Discord.JS V14 * Ping Protection V1 * Changed code to the requested changes, and adjusted code logic to actually properly support multiple moderation actions (not tested before, and didn't work during testing) * Made adjustments to code as requested, and added an intent to main.js to make it work properly. * Fixed the missing footer on embeds. Fixed a small typo in the default waning message configuration and added an emoji to the why easter egg. * Ping Protection V1.1 * Quickly updated locales for better explanation about exceptions for whitelisted * Ping Protection V1.1 remastered * Another remastered version * Added categories in 2 configs * Used proper emoji's that SCNX supports * Used the new updated ones I suggested that were added (and hopefully also work) * Updated some small changes from Copilot --------- Co-authored-by: Kevinking500 <Kevinking500> * bumped changes * feat(economy): implements "Artikel bearbeiten" (#179) * feat(economy): implements "Artikel bearbeiten" Implements https://featureboard.net/suggestions/95f5a741-6d35-4b86-9c67-abd900dca76e * fix(economy): Adressed the issues copilot pointed out and also fixed them in createShopItem --------- Co-authored-by: Kevin <kvanduijn82@gmail.com> Co-authored-by: jateute <git@jateute.de>
This is a small update to the current Ping Protection module.
This update includes the following changes:
I apologize for not catching these bugs in the initial release
No AI has been used this time.