This is a starter project you can use for your new Discord.js bot. It uses CommandKit for its command handler and CLI.
- Clone this repository:
git clone https://github.com/m1-dev/commandkit-starter.git
- Install dependencies (you may also use pnpm or yarn):
npm install
- Add environment variables:
Tip: CommandKit handles environment variables for you, so you do not need a package like dotenv.
- Head to the Discord Developer Portal and grab your bot's token.
- Create a new
.env
file in the root directory, similar in structure to the.env.example
file. - Set
DISCORD_TOKEN
to your bot's token e.g.DISCORD_TOKEN=xxxxxxxxx
- Run your app:
- During Development:
npm run dev
- During Production:
npm run build
npm start
๐ Congratulations, you now have a Discord bot with CommandKit!