This is a Telegram bot designed to assist users in checking currency exchange rates and performing currency conversions. The bot currently provides support for both INR (Indian Rupee) and USD (United States Dollar) currency conversions. You can use this bot to quickly get the latest exchange rate or perform currency conversions within your Telegram chats.
Discover the bot on Currency Exchange Bot
-
Clone this repository:
git clone https://github.com/ideepakpg/currency-exchange-bot.git
-
Open the project in your favorite C# IDE (e.g., Visual Studio, Visual Studio Code).
-
Replace
BOT_TOKEN
in the Program.cs file with your Telegram Bot API token.Unsure about obtaining a bot token from Telegram? Follow these steps:
-
To create your own Telegram bot, you can follow these steps:
- Open Telegram and search for "BotFather"
- Start a chat with BotFather.
- Use the
/newbot
command to create a new bot. - Follow the instructions to choose a name and username for your bot.
- BotFather will provide you with an API token. Copy and use this token in your code, replacing the placeholder where
BOT_TOKEN
is written.
- Build and run the project
dotnet build dotnet run
To interact with the Currency Exchange Bot, you can use various commands and currency conversion requests:
-
/start
: Start using the Currency Exchange Bot. It provides information about how to use the bot and the available commands. -
/help
: Get help on using the bot. This command explains the format for currency conversion requests and lists the currently supported currencies. -
/about
: Learn more about the bot. This command provides information about the bot's development and source code.
You can request currency conversions by entering an amount and the source currency (either INR or USD) in the following format:
<amount> <source_currency>
For example:
100 INR
to convert 100 Indian Rupees to United States Dollars.10 USD
to convert 10 United States Dollars to Indian Rupees.- The bot will provide you with the converted amount and the latest exchange rate.
Currently, the bot supports the following currencies for conversion:
- Indian Rupee (INR)
- United States Dollar (USD)
I am continuously working to enhance the capabilities of this bot, and I plan to add support for additional currencies in the near future. Stay tuned for updates as I expand the range of supported currencies to better serve your currency exchange needs.
The Currency Exchange Bot was developed using C# and the Telegram Bot API in .NET.