Vanity URL Protection

This feature protects your server's custom vanity URL from unauthorized changes. It ensures that only the server owner can modify the vanity URL, and automatically reverts any unauthorized changes.

Setup

  1. Enable vanity URL protection: ;vanityguard enable

  2. (Optional) Set the specific vanity URL to protect: ;vanityguard set yourvanityurl

  3. (Optional) Set a log channel for alerts: ;vanityguard logchannel #mod-logs

Example Use Case: A server has the vanity URL discord.gg/squint. They want to ensure this URL is never changed by a rogue administrator.

  1. Run ;vanityguard enable

  2. If a non-owner admin attempts to change the vanity to discord.gg/newlink, the system will automatically revert it back to discord.gg/squint and log the attempt.

Configuration

  • enabled: Toggles the vanity URL protection on or off.

  • protectedVanity: The specific vanity URL string that the system will protect. Any changes to the server's vanity URL that do not match this string (and are not made by the server owner) will be reverted.

  • logChannel: The ID of the channel where alerts and logs related to vanity URL changes are sent.

Common Issues:

  • Reversion fails → Ensure the bot has the Manage Server permission. Without this, the bot cannot revert the URL change.

  • Owner changes the URL, but it reverts back → The system automatically updates the protectedVanity when the owner makes a change. If it reverts, check if the owner has the bot whitelisted in the Anti-Nuke system (if enabled).

  • No alerts are sent → Verify the logChannel is set and the bot has Send Messages permission there.

Usage

Once enabled, Vanity URL Protection monitors guildUpdate events. If a change to the server's vanity URL is detected:

  • If the change is made by the server owner, the protectedVanity setting is updated to the new URL.

  • If the change is made by anyone else, the change is automatically reverted to the protectedVanity URL, and an alert is sent to the logChannel.

Important: The bot requires the Manage Server permission to function correctly.

  • ;vanityguard - Main command for managing vanity URL protection.

Last updated

Was this helpful?