A professional, open-source automation system designed to manage community migrations between Discord servers.
Discord Guild Shift is a high-performance bot built to automate the transition of members from an Old Server to a New Server.
When a user joins your new server, the bot instantly verifies if they are a member of the old server. Based on your configuration, it automatically syncs roles, logs the event, and optionally kicks them from the old server to ensure a clean migration.
- ⚡ Smart Detection: Listens for joins in the
New Guildand cross-references them with theOld Guild. - 🎭 Role Assignment: Automatically grants specific roles to verified migrants in the new server.
- 👢 Auto-Kick System: (Configurable) Automatically kicks the user from the old server after they successfully join the new one.
- 🔒 Safety First: Built with Zod for strict environment validation. The bot will not start if the configuration is invalid.
- 📝 Webhook Logging: detailed logs of every migration event sent directly to a private Discord channel.
- ❤️ Keep-Alive: Includes a built-in HTTP server to prevent the bot from sleeping on free hosting platforms.
Clone this repository
pnpm install --frozen-lockfileCreate a .env file in the root directory and add the following:
# Bot Token
TOKEN=your_bot_token
# Server IDs
OLD_GUILD=1080560914262139001 (old guild id)
NEW_GUILD=1005766057480421466 (new guild id)
# Role IDs to give in the New Guild (Comma separated)
ROLES=1462197920999673918 (if you want multiple then like this 1462197920999673918,1462197920999675253,146219792626262)
# Logging Webhook (Required for logs)
WEBHOOK_URL=https://discord.com/api/webhooks/xxx/yyy
# Kick user from old guild? (true/false)
KICK_FROM_OLD=false# Build the TypeScript code
pnpm run buildOR
# Build the TypeScript code
tsc# Start the bot
pnpm start- Administrator Privileges: The bot must have Administrator permissions in BOTH the Old and New guilds to fetch members and kick users. (if bot haven't administrative permission then system automatically crash)
- Role Hierarchy: In the New Guild, ensure the Bot's role is higher than the roles it is trying to assign.
Contributions are welcome!
- Fork the project
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Developed with ❤️ by Rajnish