A simple Discord bot built with Discord.js v14 that automatically assigns roles to new members when they join your server.
- 🚀 Automatic role assignment for new members
- ⚙️ Multi-server support
- 🔒 Secure token-based authentication
- 💪 Built with Discord.js v14
- Node.js 16.9.0 or higher
- A Discord Bot Token
- Server Admin permissions to add the bot
- Clone this repository:
git clone https://github.com/Botman64/autorole.git
cd autorole- Install dependencies:
npm install- Set up your configuration:
- Copy
.env.exampleto.envand add your bot token - Edit
config.jsonwith your server and role IDs
- Copy
Create a .env file with your bot token:
BOT_TOKEN=your_bot_token_hereIn config.json, add your server ID and the role ID you want to assign:
{
"your_server_id": "role_id_to_assign",
"another_server_id": "another_role_id"
}- Start the bot:
npm start- Invite the bot to your server with the following permissions:
- Manage Roles
- Read Messages/View Channels
MANAGE_ROLES- For assigning roles to new membersVIEW_CHANNELS- For detecting when new members join
If you encounter any issues or have questions, please open an issue in this repository.
This project is licensed under the GPL-3.0 License.