Skip to content

A Telegram bot providing real-time Egyptian Pound exchange rates, gold prices, and currency conversion. Supports multiple currencies.

Notifications You must be signed in to change notification settings

AhmedMohamedAbdelaty/EGP-ExchangeRates-TelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EGP Exchange Rates

EGP Exchange Bot is a Telegram bot that provides users with financial information. It retrieves and sends official bank and black market exchange rates of the Egyptian Pound (EGP) against various currencies, as well as current gold prices.

You can interact with the bot using this link: EGP Exchange Bot

Features of the Bot

  1. Currency Rates: The bot provides the latest currency rates for the Egyptian pound in both banks and the black market. It supports multiple currencies including USD, EUR, GBP, SAR, AED, and KWD.

  2. Gold Prices: The bot fetches the latest gold prices. It supports multiple types of gold including 24k, 21k, 18k, 22k, Gold Ounce, and Gold Pound (Coin).

  3. Currency Conversion: The bot provides a currency conversion feature. Users can convert between different currencies.

  4. Interactive Menus: The bot uses interactive menus to guide the user through its features. It supports multiple commands including "start", "currency rates", "specific currency rate", "gold prices", and "currency conversion".

  5. Error Handling: The bot has robust error handling. If it fails to fetch the latest data, it will return the last successfully fetched data.

  6. Localization: The bot supports Arabic language for its interface and responses.

Deployment

The bot is deployed on the Cloudflare Workers platform. You can interact with it using this link: EGP Exchange Bot

You can find the deployment guide here.

Setting Up Your Bot Token

To set up your bot token, follow these steps:

  1. Create a .env file in the root directory of your project.

  2. In the .env file, add your bot token like this:

    BOT_TOKEN=YourBotTokenHere

    Replace YourBotTokenHere with the token you received from the BotFather on Telegram.

  3. The bot token is now stored in an environment variable and can be accessed in your code like this:

    const BOT_TOKEN = process.env.BOT_TOKEN;

    This line of code retrieves the bot token from the environment variables and assigns it to the BOT_TOKEN constant.

Remember to add the .env file to your .gitignore file to prevent it from being committed to your repository. This is important to keep your bot token secure.

Demo Video

vvideo.mp4

Awareness and Reflections

This bot is a small practice project on JavaScript and Telegram bots. While the code and the bot may have some issues, I'm open to feedback and will try to address any problems. I appreciate your understanding and patience.

The bot retrieves currency prices from egcurrency.com. Please note that we are not the developers of this website and the bot's functionality is based on the availability of the data from this source. If the source website is down or its structure changes, the bot may not function correctly.

Learning

This project has been a significant learning experience in JavaScript and Telegram bot development. It has provided hands-on experience with various technologies and libraries such as Grammy, Cheerio, and Cloudflare Workers. It has also been an exercise in web scraping, asynchronous programming, and bot deployment.

Acknowledgements

We would like to acknowledge the following:

About

A Telegram bot providing real-time Egyptian Pound exchange rates, gold prices, and currency conversion. Supports multiple currencies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published