A clean, modern, and scalable Discord bot template built with Node.js, structured event handling, and optional integration with the Groq API for AI-powered interactions.
This template is designed for developers who want a fast, organized starting point without dealing with messy boilerplate.
- Built-in Multiple API platform integration (see below)
- Fast startup with Node.js +
discord.js - Environment variable support with
.env - Easy to deploy locally or on platforms like Replit, Railway, Render, etc.
📦 project
┣ 📄 bot.js # Main bot file
┣ 📄 .env
┣ 📄 package.json
┣ 📄 userpreference.json
┣ 📄 guildchannels.json
┣ 📄 guildpermissions.json
┣ 📁 APIS
┣ other files...
┗ 📄 README.md
npm install
Ways to obtain them are self explanatory and if u dont know u noob
TOKEN=
GROQ_API_KEY=
OPENAI_API_KEY=
GOOGLE_AI_KEY=
CLAUD_API_KEY=
AIML_API_KEY=
CLIENT_ID=
GUILD_ID=
Note: You only need one of the api keys unless you want to try different apu platforms.
node bot.js
You can test commands locally by running:
node bot.js
Make sure your bot is invited to your server with appropriate permissions. Use an invite link with this format:
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&scope=bot&permissions=8- Import the project
- Run normally if ur not dumb
- Railway / Render / Heroku / VPS all work the same
- Ensure environment variables are set
- Ensure
node bot.jsis your start command
/personality set Set the bot’s active personality string.
/personality view Show the current personality.
/personality clear Remove the current personality.
/permission <set|remove> Grant or revoke a role’s access to bot commands.
/setai Select the AI backend used for responses. Only one is active.
/channel Bind the bot to the channel where this command is run. The bot listens and replies only there.
Pull requests are welcome! If you want to improve structure, add better command loaders, or enhance API integration, feel free to open an issue first.
This project is licensed under the MIT License. Use it freely for personal or commercial purposes.