A working example of NodeJS telegram bot integration with Near Protocol api to get your validator statistic in notification like delegators count, total delegation, uptime and alerts
All bot commands
.
Explore other examples
·
Report Bug
Near Ukrainians Guild is a fast-growing guild aimed at providing high-quality educational content and assistance to grow a strong community of Ukrainian developers/entrepreneurs in the Near Protocol ecosystem
💡 Before you begin, make sure you have the following installed
Follow these simple instructions to set up a local development environment
- Clone the repo
git clone https://github.com/nearuaguild/near-validator-bot.git
- Install NPM packages
yarn
- Create bot via bot-father in telegram, add to your channel to get updates
- Copy the example env file to
.env
and change values for yours, like your channel id and bot idcp .env.example .env
- Build server
yarn build
- Launch application
yarn start or pm2 start dist/index.js
- Get updated about your bot
If everything is updated you will see next message:
Updated Fields:
- Pool earnings: 0.43 Near
- Updated total stake: 47314 Near
- Updated delegators count: 8
- Uptime: 100%
- Chunks produced: 0 / Chunks expected: 0
- Updated peers: 33
- Is node active: true
But in general case you will receive updates only things that have changed, like:
Updated Fields:
- Pool earnings: 7.19 Near
- Updated total stake: 47350 Near
Check here
- Add docker
- Add more commands
- Add database to subscribe to your bot directly from bot without setup your own
- Add Contribution rules
- Add version support
Please if you see errors or have ideas, just create PR
Distributed under the MIT License. See LICENSE.txt
for more information.