Skip to content

vvzvlad/currva_converter_bot

Repository files navigation

Currva Converter Bot

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.

About the Project

A Telegram bot for currency conversion.

Start with Docker Compose

  1. Create a docker-compose.yml file:

    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
  2. Start the bot by running:

    docker-compose up -d

Metrics Configuration

The bot can optionally report metrics to InfluxDB. Set INFLUX_VERSION to enable metrics reporting:

  • INFLUX_VERSION=2 for InfluxDB v2.x
  • INFLUX_VERSION=1.8 for InfluxDB v1.8
  • If not set, metrics reporting will be disabled

Common settings:

  • INFLUX_URL - InfluxDB server URL
  • INFLUX_REPORTING_PERIOD - Reporting period in seconds (default: 3600, minimum: 100)
  • INFLUX_TOPIC - Topic for metrics (e.g. bots/currva_converter_bot)

InfluxDB v2.x Configuration

When INFLUX_VERSION=2, set the following environment variables:

  • INFLUX_TOKEN - API token
  • INFLUX_ORG - Organization name
  • INFLUX_BUCKET - Bucket name

InfluxDB v1.8 Configuration

When INFLUX_VERSION=1.8, set the following environment variables:

  • INFLUX_DB - Database name
  • INFLUX_USER - Username
  • INFLUX_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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages