Skip to content

Ping Protection V1.1#171

Merged
SCDerox merged 50 commits intoScootKit:beta-discordjs14from
Kevinking500:main
Feb 18, 2026
Merged

Ping Protection V1.1#171
SCDerox merged 50 commits intoScootKit:beta-discordjs14from
Kevinking500:main

Conversation

@Kevinking500
Copy link
Contributor

This is a small update to the current Ping Protection module.
This update includes the following changes:

  • [QOL] Updated some locales and improved some of their names
  • [Bug] Fixed the automod default block message from being over the 150 characters limit
  • [Bug] Fixed that the whitelisted users didn't show

I apologize for not catching these bugs in the initial release
No AI has been used this time.

Kevinking500 and others added 30 commits December 11, 2025 19:46
… 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.
Listed the warnings for all commands except the panel command as the bot already checks for administrator perms.
…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"
@Fridolin012
Copy link

I noticed a few things I’d like to share regarding the module:

  • Redundant Settings: In the "Moderation Actions" config, there’s a setting for "Pings to trigger moderation," but there’s also a custom function for it. It feels a bit messy to have both. I’d suggest just keeping the custom function ("custom timeframe") to make it cleaner.
  • Log Retention: Why is the mod-log capped at 12 months? The moderation module doesn't have this limit, and I’m wondering if this can be changed to stay consistent with the rest of the tools.

@Kevinking500
Copy link
Contributor Author

Hi Fridolin,
That is indeed a bit messy, I will change that.
For the log retention though, as this is a module for "only" pings and not otherwise a broad (multiple) rule breaking that can include a big variety of punishments like warnings, mutes, kicks, bans and things that it feels like having it more than 1 year for "only" pinging is a lot, but I can extend it if you feel like it would need to be more, or even do no limit.

@Fridolin012
Copy link

Hi,

thank you for your quick response. I think we should ask @SCDerox for the second question^^

@SCDerox
Copy link
Member

SCDerox commented Feb 1, 2026

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.

@Kevinking500
Copy link
Contributor Author

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 😅

@Kevinking500
Copy link
Contributor Author

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.

@Kevinking500
Copy link
Contributor Author

Sorry, I forgot you were talking about moderation log

@Kevinking500
Copy link
Contributor Author

Hi, I quickly added the category feature in the configuration.json and storage.json config files to make it look more sleek ^^

@Kevinking500
Copy link
Contributor Author

Thanks to Simon who provided me the list of emoji's that actually work in the dashboard, I adjusted it to use supported ones ^^

@SCDerox
Copy link
Member

SCDerox commented Feb 14, 2026

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 whitelisted to 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 pingsCountBasic to pingsCount (and removing pingsCountAdvanced) is a breaking change for existing moderation.json config 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, but enforceRetention() checks storageConfig.DeleteAllPingHistoryAfterTimeframe (capital D). 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.

Copy link
Member

@SCDerox SCDerox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues from my side, please address the small thing copilot found and then re-request a review to get this merged 😄

@Kevinking500
Copy link
Contributor Author

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 ^^

@Kevinking500
Copy link
Contributor Author

I have found no bugs during the (fairly) short testing period of moderation actions ^^

@Kevinking500 Kevinking500 requested a review from SCDerox February 17, 2026 19:53
@Kevinking500
Copy link
Contributor Author

I also addressed the tab in the locales I forgot to do which was mentioned by Jan in his latest PR here ^^

@SCDerox SCDerox merged commit de23ed2 into ScootKit:beta-discordjs14 Feb 18, 2026
1 check passed
SCDerox added a commit that referenced this pull request Mar 7, 2026
* 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>
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.

4 participants