Zum Hauptinhalt springen

Ping-Protection

Protect specific members and roles from unwanted mentions with configurable moderation actions.

Ping-Schutz
Leistungsstarkes und hochgradig anpassbares Ping-Schutz-Modul zum Schutz von Mitgliedern/Rollen vor unerwünschten Erwähnungen mit Moderationsfunktionen.
Dieses Modul ist Open-Source.
Dieses Modul speichert Daten in der Datenbank deines Bots.
Dieses Modul hat 3 Konfigurationsdateien.
Dieses Modul wird auf über 100 Servern auf SCNX aktiv verwendet.
Dieses Modul ist bei jedem Plan kostenlos dabei. Mehr über Preise erfahren.

Features

  • Protect specific users and roles from being pinged by unauthorized members.
  • Automatically protect all users who have a protected role.
  • Whitelist specific users, roles, and channels that are exempt from ping protection.
  • Optionally use Discord's native AutoMod to block messages containing protected pings before they are sent.
  • Configurable moderation actions (mute or kick) when a user pings protected members too many times.
  • View ping history and moderation actions for any user.
  • Configurable data retention policies for ping history and moderation logs.
  • Track users who leave and rejoin the server.

Setup

  1. Enable the module on your server.
  2. Open the General Configuration and add the users or roles you want to protect.
  3. Configure any whitelisted users, roles, or channels that should be allowed to ping protected members.
  4. If you want to use AutoMod blocking, enable it in the configuration. The bot will create and maintain a Discord AutoMod rule automatically.
  5. Optionally configure moderation actions to automatically punish users who repeatedly ping protected members.
  6. Make sure the bot has View Channel, Send Messages, and Embed Links permissions in channels where protected members might be pinged. If using AutoMod, the bot also needs Manage Server permission. For moderation actions, the bot needs Moderate Members (for mute) or Kick Members (for kick).

Usage

Once set up, the module works automatically:

  • When a user pings a protected member or role, the bot sends a warning message in the channel.
  • If AutoMod is enabled, the message is blocked before it is sent, and the user sees a custom block message.
  • Pings are recorded in the user's history. If configured moderation thresholds are reached, the bot automatically mutes or kicks the user.

Viewing ping history and actions

Administrators can use the /ping-protection user panel command to view a management panel for any user. This panel shows their ping count, moderation action count, and provides buttons to view detailed history or delete all data for that user.

Protected and whitelisted lists

Use /ping-protection list protected to see all protected users and roles, and /ping-protection list whitelisted to see all whitelisted users, roles, and channels.

Commands

Dokumentation Verstehen
In dieser Dokumentation bezeichnen wir eine verpflichtende Slash-Befehl-Option mit dem Namen name und dem Typen Typ als name:<Typ>. Optionen, die nicht Pflichtfelder sind, werden als [name:<Typ>] angegeben. Wenn sich die Aktionen eines Befehls zwischen Pflichtfeldern und Nicht-Pflichtfeldern sehr unterscheiden, listen wir sie eventuell separat.
Beispiele
  • /moderate ban user:<Mitglied>: Dieser Befehl (/moderate ban) hat nur eine verpflichtende Option mit dem Namen "user", die nur ein Mitglied akzeptiert.
  • /moderate ban victim:<Mitglied> reason:<Text>: Dieser Befehl (/moderate ban) hat eine Option mit dem Namen "victim" als Pflichtangabe, die nur ein Mitglied akzeptiert, und ein weiteres Pflichtfeld mit dem Namen "reason", das jeglichen Text als Wert akzeptiert.
  • /moderate ban victim:<Mitglied> reason:<Text> [proof:<Anhang>]: Dieser Befehl (/moderate ban) hat eine Option mit dem Namen "victim" als Pflichtangabe, die nur ein Mitglied akzeptiert, und ein weiteres Pflichtfeld mit dem Namen "reason", das jeglichen Text als Wert akzeptiert. Zusätzlich gibt es eine optionale Option mit dem Namen "proof", die einen Anhang als Wert akzeptiert.
CommandDescription
/ping-protection user panel user:<User>Display a management panel for a user with their ping and action counts.
/ping-protection user history user:<User>View the ping history of a specific user.
/ping-protection user actions-history user:<User>View moderation actions taken against a user.
/ping-protection list protectedView all protected users and roles.
/ping-protection list whitelistedView all whitelisted roles, channels, and users.

Configuration

General Configuration

In this configuration file, you set up the protection rules and whitelists. Open it in your dashboard.

FieldDescription
Protected RolesRoles that are protected from pings.
Protect all users with protected roleIf enabled, all users with at least one protected role are protected, even if not listed individually.
Protected UsersSpecific users who are protected from pings.
Ignored RolesRoles that are allowed to ping protected members.
Ignored ChannelsChannels where pings to protected members are ignored.
Ignored UsersSpecific users whose pings to protected members are ignored.
Allow Reply PingsIf enabled, replying to a protected user's message (with mention enabled) is allowed.
Self-Ping ConfigurationWhat happens when a protected user pings themselves: get punished, ignored, or receive fun easter eggs.
Enable AutoModIf enabled, the bot uses Discord's native AutoMod to block messages with pings to protected members.
AutoMod Log ChannelChannel where AutoMod alerts are sent. Only applies if AutoMod is enabled.
AutoMod Block MessageThe message shown to users when their message is blocked by AutoMod.
Ping Warning MessageThe message sent in the channel when a user pings a protected member. Supports %target-name%, %target-mention%, %target-id%, and %pinger-id%.

Moderation Actions

In this configuration file, you set up automatic punishments for repeated pings. Open it in your dashboard.

You can configure multiple punishment rules, each with its own threshold and action.

FieldDescription
Ping CountThe number of pings required to trigger this moderation action.
Use Custom TimeframeIf enabled, you can set a custom timeframe in days for this rule.
Timeframe DaysThe number of days in which the pings must occur to trigger this action. Only applies if custom timeframe is enabled.
Action TypeThe punishment to apply: mute or kick.
Mute DurationHow long to mute the user (in minutes). Only applies when the action type is mute.
Enable Action LoggingIf enabled, a message is sent in the channel when a moderation action is taken.
Action Log MessageThe message sent when a user is punished. Supports %pinger-mention%, %pinger-name%, %action%, %pings%, %timeframe%, and %duration%.

Data Storage

In this configuration file, you configure data retention policies. Open it in your dashboard.

FieldDescription
Enable Ping HistoryIf enabled, the bot keeps a history of pings to enforce moderation actions.
Ping History RetentionHow long to keep ping history, in weeks (minimum 4, maximum 96).
Delete all ping history after timeframeIf enabled, all ping history for a user is deleted when the retention period expires, instead of only the oldest entries.
Moderation Log RetentionHow long to keep moderation action records, in months (minimum 1, maximum 24).
Enable Leaver Data RetentionIf enabled, the bot keeps data about users after they leave the server.
Leaver RetentionHow long to keep data after a user leaves, in days (minimum 1, maximum 7). Only applies if leaver data retention is enabled.

Troubleshooting

  • The bot is not detecting pings: Make sure the user or role is listed as protected in the configuration. Verify that the pinging user is not whitelisted and the channel is not in the ignored channels list.
  • AutoMod is not blocking messages: Ensure AutoMod is enabled in the configuration and the bot has Manage Server permission to create AutoMod rules.
  • Moderation actions are not being taken: Check that your moderation action rules are configured correctly and that the ping count threshold has been reached within the configured timeframe.
  • The bot cannot mute or kick a user: Make sure the bot has the required permissions (Moderate Members for mute, Kick Members for kick) and that the bot's role is above the target user's roles.

Stored data

The following data is being stored by this module:

For every recorded ping:

  • The user ID of the person who pinged
  • The message URL (or "Blocked by AutoMod" if blocked)
  • The target user or role ID
  • Whether the target is a role or user
  • Metadata about the entry (date when created and last updated)

For every moderation action:

  • The user ID of the punished user
  • The action type (mute or kick) and duration
  • The reason for the action
  • Metadata about the entry (date when created and last updated)

For users who leave the server:

  • The user ID
  • The date they left
  • Metadata about the entry (date when created and last updated)

Data is automatically deleted based on the configured retention periods. You can also delete all data for a specific user through the /ping-protection user panel command. To remove all data stored by this module, purge the module database.