Microverse ruby capstone project to build a bot
This is a solo project to build a bot by putting into practice the concepts of Object Oriented Programming (OOP) learned in Ruby Module. I have demonstrated the use of classes (and Module) in Ruby and how to access their properties and methods. Here is a brief description of my bot.
Paddy (@PaddyMyBot) is a bot built using telegram bot API. It has the ability to scrape news channels and display the latest news headlines in the user's chat. The idea behind this project is to enable fast paced individuals to be on the know by looking at news headlines.
- Launch telegram app
- Search for @PaddyMyBot
- Read Description and click
Start
- Enter
/
to select news source - View first headline
- Click
/next
command for next headline - Click
/stop
command to end session
- Ruby
- Telegram account & Bot Token
- Terminal or command line
- Latest version of Ruby
To create your own telegram bot based on the same logic
- Launch Telegram and Talk to the BotFather (@BotFather)
- Enter /help to see a list of commands
- Click /newbot command and enter bot name and username
- Copy your Token (or use
/token
or generate) - Open terminal or command line
- Run the following commands
- $
git clone https://github.com/francisuloko/telegram-bot.git
- $
cd telegram-bot/
- Open
./lib/bot.rb
and create yourTOKEN
variable (KEEP IT SECRET) (Or create the variable in config/token.rb) - Run the following command to start your bot
- $
ruby ./bin/main.rb
- Lauch Telegram and search for @your_bot
- Jump to
How to use Paddy
section is this README.
From project directory, run the following command
bundle exec rspec
or rspec
๐ค Author1
- GitHub: @FrancisUloko
- Twitter: @FrancisUloko
- LinkedIn: Francis Uloko
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a โญ๏ธ if you like this project!
- Microverse Inc.
- The Odin Project
This project is MIT licensed.