A type-safe Discord.js v14 boilerplate built with TypeScript and the Bun runtime.
- Usage of Discord interactions (application/"slash" commands)
- Type-safe environment variable validation with t3-env
- Example
/ping
and/purge
commands - Command and event handlers
- Prettier integration
Feel free to share your ideas, report issues, and help make discord-bot-template even better!
Clone the project
git clone https://github.com/aelew/discord-bot-template.git
Go to the project directory
cd discord-bot-template
Install dependencies
bun install
Set environment variables
To run this project, you need to set the required environment variables.
Copy `.env.example` into a new file called `.env` and fill in the values.
Deploy application commands
bun run deploy
Start the bot
bun run start
bun run start # start the bot
bun run prettier # format code
bun run deploy # deploy commands (run after adding/modifying command data)