This is a boilerplate discord bot application written in Typescript, using Discord.js using Yarn as the package manager. This repository serves as an example for a Medium article. You can read the article here.
Before you start, make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/QuentinManemla/serenity-bot.git
-
Navigate to the project directory:
cd serenity-bot
-
Install dependencies using Yarn:
yarn
-
Create a new Discord bot and obtain the token. You can do this by creating a new application on the Discord Developer Portal.
-
Rename the
.env.example
file to.env
and update the fields with the neccesarry values
To run the bot in development mode with automatic restarts, use:
yarn dev
Before running the bot in production, make sure to build the TypeScript code:
yarn build
Then start the bot:
yarn start