Telegram bot for currency conversion.
WARNING!
This code was generated by an Cursor/Claude-3.5-sonnet. Read it at your own risk!
The author takes no responsibility for:
Eye fatigue
Brain overload
Blown minds
Any other injuries resulting from trying to understand this code
If you're still here and want to proceed - good luck! You have been warned.
A Telegram bot for currency conversion.
-
Create a
docker-compose.ymlfile:volumes: data: services: bot: image: ghcr.io/vvzvlad/currva_converter_bot:latest restart: unless-stopped environment: - BOT_TOKEN=your_telegram_bot_token - API_KEY=your_exchange_rates_api_key for https://api.apilayer.com/currency_data
-
Start the bot by running:
docker-compose up -d
The bot can optionally report metrics to InfluxDB. Set INFLUX_VERSION to enable metrics reporting:
INFLUX_VERSION=2for InfluxDB v2.xINFLUX_VERSION=1.8for InfluxDB v1.8- If not set, metrics reporting will be disabled
Common settings:
INFLUX_URL- InfluxDB server URLINFLUX_REPORTING_PERIOD- Reporting period in seconds (default: 3600, minimum: 100)INFLUX_TOPIC- Topic for metrics (e.g. bots/currva_converter_bot)
When INFLUX_VERSION=2, set the following environment variables:
INFLUX_TOKEN- API tokenINFLUX_ORG- Organization nameINFLUX_BUCKET- Bucket name
When INFLUX_VERSION=1.8, set the following environment variables:
INFLUX_DB- Database nameINFLUX_USER- UsernameINFLUX_PASSWORD- Password
The bot will report the following metrics at configured intervals:
- Total requests count
- Total inline requests count
- Unique users count
- Unique chats count