- Install Node.js
- Rename the
process.envfile in the root directory of the project to.env - Set the token in the
.envfile to the variableTOKEN="" - Set the database url in the
.envfile to the variableDATABASE_URL="" - By default, the project is configured to use SQLite as the database.
- Install all packages
npm i
- Generate the Prisma client
npx prisma generate
- Apply the migrations to the database
npx prisma migrate dev
- To build the project
npm run build
- To start the bot in production mode
npm start
- To start the bot in development mode
npm run dev
- To start the bot in development mode with auto build
npm run dev:build
Note:
- Make sure to have a
.envfile in the root directory of the project with the correct variables and values. - The
npm run devandnpm run dev:buildcommands are used to automatically re-start the bot when there are changes in the code. - The
npm run buildcommand is used to compile the TypeScript code into JavaScript. - The
npm startcommand is used to start the bot in production mode. - The
npx prisma generatecommand is used to generate the Prisma client. - The
npx prisma migrate devcommand is used to apply the migrations to the database.
This project was created by Pavlotech
The architecture of this project is based on Philainel