This project is a strong foundation for building powerful, scalable Discord bots using Discord.js. It focuses on best practices, modular structure, dynamic command/event handling, and modern development standards.
Organized by categories for both prefix, context and slash commands.
Built-in support for major Discord events with dynamic event loading for scalability.
Manage environment variables and bot settings via .env
files or JSON configs.
Example setups for connecting to external APIs like GitHub, RSS feeds, and more.
Pre-built utilities for logging, embed creation, and more to streamline development.
Ensure you have the following installed:
- Node.js v16.6.0 or higher.
- npm v7 or higher
- Discord Developer Portal account to create a bot and get your bot token.
Follow these steps to set up the bot on your local machine:
- Clone the repository:
git clone https://github.com/nexoslabs/bot-discord-template.git
- Install dependencies:
npm install
Create a .env
file in the root directory:
DISCORD_BOT_TOKEN=your-token
DISCORD_BOT_PREFIX=!
DISCORD_CLIENT_ID=your-client-id
DISCORD_GUILD_ID=your-guild-id (optional for testing)
npm run bot:start
npm run dev
npm run bot:deploy
npm run bot:delete
Command | Type | Description |
---|---|---|
!help |
Prefix | Lists all available commands |
!info |
Prefix | Displays bot information |
!ping |
Prefix | Check bot and API latency |
!say |
Prefix | Make the bot repeat a message |
!server |
Prefix | Displays server information |
!user |
Prefix | Displays your user details |
Command | Description |
---|---|
/ban |
Bans a user |
/unban |
Unbans a user |
/kick |
Kicks a user |
/mute |
Mutes a user |
/unmute |
Unmutes a user |
/timeout |
Temporarily mutes a user |
/untimeout |
Removes timeout |
/warn |
Warns a user |
/purge |
Bulk deletes messages |
/slowmode |
Enables channel slowmode |
- Embed Builder β Create reusable, styled Discord embeds
- Logger β Color-coded logs for different levels (info, warn, error)
- Centralized Error Handler β Catch and manage runtime errors
Comming Soon!
We β€οΈ contributions! Follow these steps to contribute:
- π΄ Fork the repository
- πΏ Create a new branch (
git checkout -b feature/AmazingFeature
) - πΎ Commit your changes (
git commit -m 'Add some AmazingFeature'
) - π Push to the branch (
git push origin feature/AmazingFeature
) - π Open a Pull Request
π See our Contribution Guidelines for more details.
This project is licensed under the Apache-2.0 license. See the LICENSE file for details.
Special thanks to:
- Discord.js team for the amazing library
- Node.js team
- All open-source contributors π
π¬ Join us on Discord: Click Here
π¦ Follow on Twitter: @nexoslabs
π§ Email: contact@nexoscreation.tech
Made with β€οΈ by the @nexoslabs Team