“The most helpful bot you’ve ever seen on Telegram.”
This is a personal fun project to try various AI and Telegram bot things.
It is not set up for general usage and breaks most software development practices for good code.
Test coverage is terrible, but I do have lots of fun trying out new things here and there.
- Install/update node.js, LTS recommended.
- Run
npm install
to install dependencies. - Run
npx prisma migrate dev
to create the local sqlite3 database. - Copy
.env.example
to.env
. - Fill in the required data into
.env
:- Register a telegram bot with @BotFather and fill in
USERNAME
and theTELEGRAM_TOKEN
given from @BotFather. - Create an account for the OpenAI API and fill in the
OPENAI_API_KEY
. - Other config options as wanted.
- Register a telegram bot with @BotFather and fill in
- Update dependencies:
npm install
- Run new database migrations:
npm run migrate
- Execute:
npm run run-dev
- Update dependencies:
npm install
- Build:
npm run build
- Remove dev dependencies:
npm install --omit=dev
- Deploy (however you like)
- Run database migrations:
npm run migrate-prod
- Execute:
node dist/index.js