A bot that uses a couple of gems and the hiztory.org API to assess a user's birthday input and check if it's a valid date. If so, it fetches data from the external API. This data consists of famous people born on the same month/day. All this information is returned to the user as a Telegram message.
- Ruby
- Gems: telegram-bot-ruby, libxml-ruby, net-http-persistent
To get a local copy up and running follow these simple example steps:
- Clone the repository as indicated by Setup section below
- In the local directory in which this repository is cloned, enter in the terminal or text-editor console:
- Rrun bundle to install all the dependancies:
bundle install
- Then run this:
ruby bin/main.rb
- This will start the bot in your console. It will print 'Bot is running in the background...' to indicate that it is running.
- Text editor (ie VSCode)
- GitHub
- Git
- To run the tests in the 'main_spec.rb' file run 'rspec' in the terminal from within project root.
Clone repository from github to your local drive by following these steps:
-
Go to the main page of the repository
-
Above the listed files, click the green Code button
-
You can clone the repository using:
- GitHub CLI:
gh repo clone zilton7/telegram-bot.git
- SSH:
git clone [email protected]:zilton7/telegram-bot.git
- HTTPS:
git clone https://github.com/zilton7/telegram-bot.git
-
Open Terminal
-
Change the current working directory to the location you want the cloned directory
cd ~/path_to/location
-
Type one of the git clone commands listed above.
-
Press Enter to create your local clone
- Install VSCode or any text editor of your choice, to view the code on your local machine.
- Install Git.
- To use this bot in your Telegram app, please search and start conversation with
@z_bday_bot
- Type your birthday date to receive the list of famous people born on the same month and day
1997-12-02
ZIL NORVILIS
- GitHub: @zilton7
- Twitter: @devnor7
- LinkedIn: zil-norvilis
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
- Inspiration
- etc
- This project is MIT licensed.
- This project is creativecommons licensed.