This is a Express server that runs Telegram bot to interact with users and fetches token information from the EVM blockchain.
- Clone the repository:
git clone git@github.com:cryptodev523/blockchain-scan-bot.git
- Install the dependencies:
yarn
- Create a
.env
file in the root directory and add your environment variables:
You can refer the .env.example
file and replace with your variables.
- Run the server (Local)
yarn dev
GET /
: Returns a simple message indicating the server is running.POST /bs_webhook
: Receives a webhook from a Telegram bot and responds with token information.
- Contact the
BotFather
Telegram Bot and create a new bot. - Set Webhook url to the Telegram bot with the token.
https://api.telegram.org/${BOT_TOKEN}/setWebhook?url=${SERVER_URL}/bs_webhook