Skip to content

id404x/uzs-rate-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uzs-rate-bot

Telegram bot that pulls daily currency rates from the Central Bank of Uzbekistan and replies with them. I made it for myself because I was tired of opening cbu.uz in the browser every morning to check USD/UZS, and then a couple of friends started using it too.

Caches the API response for 30 minutes by default. CBU only updates rates once per day so anything more frequent than that is a waste of their bandwidth and yours.

Commands

  • /rates — the six currencies most people in Tashkent care about (USD, EUR, RUB, GBP, KZT, TRY).
  • /rate USD — just one.
  • /help — reminder of the above.

Running

npm install
cp .env.example .env

Paste your bot token (from @BotFather) into .env, then:

node index.js

Needs Node 18+ for the built-in fetch. On a server I run it under PM2:

pm2 start index.js --name uzs-rate-bot
pm2 save
pm2 startup

License: MIT.

About

Telegram bot showing daily currency rates against UZS (Node.js, cbu.uz API).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors