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
Enable vanity URL protection:
;vanityguard enable(Optional) Set the specific vanity URL to protect:
;vanityguard set yourvanityurl(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.
Run
;vanityguard enableIf a non-owner admin attempts to change the vanity to
discord.gg/newlink, the system will automatically revert it back todiscord.gg/squintand 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 Serverpermission. Without this, the bot cannot revert the URL change.Owner changes the URL, but it reverts back → The system automatically updates the
protectedVanitywhen 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
logChannelis set and the bot hasSend Messagespermission 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
protectedVanitysetting is updated to the new URL.If the change is made by anyone else, the change is automatically reverted to the
protectedVanityURL, and an alert is sent to thelogChannel.
Important: The bot requires the Manage Server permission to function correctly.
Related Commands
;vanityguard- Main command for managing vanity URL protection.
Last updated
Was this helpful?