Telegram Bot Template
Stack
- Typescript
- grammY
- Prisma
Run
- Install dependencies:
npm install
- Make
.env
file from.env.example
and provideBOT_TOKEN
andALLOWED_USERNAMES
values.ALLOWED_USERNAMES
is a comma-separated list of telegram usernames of users who can use bot. - Run postgresql database via provided docker-compose file:
docker compose up
- Push database schema:
npx prisma db push
- Run bot:
npm run dev
Deploy
Can be deployed to any VPS or cloud service. I recommend using Railway for this purpose.