Skip to content
This repository was archived by the owner on Jul 14, 2023. It is now read-only.

Commit 271c9d5

Browse files
authored
Update readme.md
1 parent 350e9e4 commit 271c9d5

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

readme.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
1-
## Coingecko CryptoBot
1+
# Coingecko Telegram CryptoBot
22

33
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/andrecrjr/CoinGecko-Telegram-Bot/tree/develop)
44

5-
Don't forget to set the Environments on `.env` file.
5+
6+
`yarn start` - ran your server once - used by run in your VPS/Server host.
7+
`yarn dev` - ran your server locally with changes.
8+
9+
# how it works
10+
11+
A telegram bot is just a web server that listens the bot events from telegram and in DEV mode is just a **pooling** from telegram (not cool for production bots), but in PRD mode its listening the webhook events direct from telegram (thankfully to [Telegraf](https://telegraf.js.org/v3#/) that helps with it).
12+
13+
You'll need to create a bot and get its private key to put in the environment file root `.env` *(just copy the .env.example and remove **.example**)*.
14+
15+
## Environment Variables
16+
All the environment will be changed looking to variable `process.NODE_ENV = "prd"`, then it'll be **production** or `dev` it'll be your *local server* when you ran.
17+
18+
```
19+
TOKEN_BTC=EXAMPLE_BOTFATHER_TOKEN - your token from botfather
20+
PORT=3000 - just for local purposes.
21+
URL_HEROKU=https://myapp.com/ - Where you deployed/hosted the telegram bot server (not just heroku, can be your vps ip for example the place you listen your port).
22+
```
23+
24+
## Work in progress
25+
26+
* Update telegraf version to 4.
27+
* Upgrade to typescript.

0 commit comments

Comments
 (0)