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.
/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.
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.