doc(readme): use env vars for setup

This commit is contained in:
Udit Karode 2023-04-09 19:25:14 +05:30
parent 02d7adbdca
commit 00006956e2
No known key found for this signature in database
GPG Key ID: 864BAA48465205F0
2 changed files with 12 additions and 10 deletions

View File

@ -3,9 +3,9 @@
# access to Bing Chat! # access to Bing Chat!
BING_COOKIE= BING_COOKIE=
# The bot token you obtained from BotFather # The bot token you obtained from BotFather.
TG_TOKEN= TG_TOKEN=
# A comma separated list of chat IDs you want to allow # A comma separated list of chat IDs you want to allow.
# to allow usage in all chats, set this to "all" # To allow usage in all chats, set this to "all".
ALLOWED_CHATS= ALLOWED_CHATS=

View File

@ -4,18 +4,20 @@ A Telegram bot that lets you interact with the Bing AI from chats that you allow
**> To start using this project,** **> To start using this project,**
* Run `yarn install` to install the dependencies. - Run `yarn install` to install the dependencies.
* Copy `variables.example.ts` to `variables.ts`, go through it, and add the required information. - Create a `.env` file or set environment variables according to the reference file `.env.example`
* Run `yarn dev` or `yarn build && yarn start` to start the bot. - Run `yarn dev` or `yarn build && yarn start` to start the bot.
**> To start using this project using Docker,** **> To start using this project using Docker,**
* Run `docker compose -f .build/docker-compose.yml build` to build the container - Run `docker compose -f .build/docker-compose.yml build` to build the container
* Copy `variables.example.ts` to `variables.ts`, go through it, and add the required information. - TODO
* Run `docker compose up -d` to start the bot. - Run `docker compose up -d` to start the bot.
**> To enable Telegram command autocompletion,** **> To enable Telegram command autocompletion,**
* Press the `Edit Commands` button in your bot's menu on BotFather, and paste the following:
- Press the `Edit Commands` button in your bot's menu on BotFather, and paste the following:
``` ```
ai - send a prompt to the AI ai - send a prompt to the AI
variant - get or set the variant of the chat variant - get or set the variant of the chat