A Telegram bot written in Python that provides real-time currency exchange rates and precious metal prices in Turkish Lira.
- Get yourself a Bot account and a token at Telegram Bots.
- If you want to run it in Docker ->Docker installed on your system.
- If you want to run it without Docker -> Python 3.11 or higher.
- Optional: A server or cloud environment for hosting (e.g., Heroku, AWS, etc.).
You have four ways to run this bot:
- Run the bot with a pre-built Docker image
- Run the bot using Docker Compose
- Build the Docker image and run the bot
- Run locally without Docker
You need to provide the following environment variable for the bot to work:
TOKEN: Your Telegram bot token from BotFather.
docker run -d --restart unless-stopped --name currencies -p 8443:8443 -e TOKEN="your-telegram-bot-token" gdagtekin/currency-bot
Check your log
docker logs -f currencies
You need to provide the following environment variable for the bot to work:
TOKEN: Your Telegram bot token from BotFather.
version: '3.9'
services:
currencies:
image: gdagtekin/currency-bot:latest
restart: unless-stopped
container_name: currencies
ports:
- "8443:8443"
environment:
- TOKEN=your-telegram-bot-token
Start the bot with Docker Compose
docker-compose up -d
Check your log
docker logs -f currencies
Clone the project
git clone https://github.com/gdagtekin/KurBot.git
Go to the project directory
cd KurBot
Build the Docker Image
docker build -t currency-bot .
Run the following command to start the bot in the container
You need to provide the following environment variable for the bot to work:
TOKEN: Your Telegram bot token from BotFather.
docker run -d --restart unless-stopped --name currencies -p 8443:8443 -e TOKEN="your-telegram-bot-token" currency-bot
Check your log
docker logs -f currencies
git clone https://github.com/gdagtekin/KurBot.git
Go to the project directory
cd KurBot
Install pipenv
pip install pipenv
Install dependencies
pipenv install
Replace YOUR-TELEGRAM-BOT-TOKEN in the Const.py file with your Telegram Bot Token.
Start the bot
python CurrenciesBot.py
Once the bot is up and running, you can start interacting with it.
Send /start
to see a welcome message and /ping
to check if the bot is responding.
/start
- Get a welcome message with bot instructions./ping
- Check if the bot is running and responding./dolar
- Get the current exchange rate of the US Dollar (USD) to Turkish Lira (TRY)./euro
- Get the current exchange rate of the Euro (EUR) to Turkish Lira (TRY)./gramaltin
- Get the current price of Gram Altın in Turkish Lira./ceyrekaltin
- Get the current price of Çeyrek Altın in Turkish Lira./ons
- Get the current price of Gold Ounce (ONS) in Turkish Lira.