Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Telegram bot built using Ruby to provide random bible verses and the latest US news headlines. The project makes use of the Telegram bot API to connect with the Telegram messenger UI and the RapidAPI to gather random bible verses and the latest US news headlines.

Notifications You must be signed in to change notification settings

vanheaven-ui/Ruby-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Telegram Bot (verse&newsbot)

This project explores the power of Ruby to integrate with the Telegram Bot API.

View Code Github Issues GitHub Pull Requests Author Twitter Follow LinkedIn follow

Screenshot of sample verse&newsbot chats

Content

About   |    Installations   |    Usage   |    Testing   |    Built With   |    Author

About

This project involves building a Telegram bot using Ruby and the Telegram bot API wrapper. Ruby classes and methods are used to create the bot functionality while the Ruby Telegram bot API wrapper gem is used to connect to the Telegram bot API. The net-http-persistent gem is used to connect to other external APIs. The Telegram bot built in this repository provides random bible verses and the latest real-time news headlines in the US.

🔧 Built With

  • Ruby 2.6.6
  • Telegram Bot API - telegram-bot-ruby (0.12.0)
  • net/http - net-http-persistent (4.0.0, 2.9.4)

🔧 Tested With

  • RSpec 3.9

Usage

To use the verse&newsbot, follow the steps in this section

🔨 Setup

First get a copy of project on your computer:

  • Clone or download the repository to a local directory on your computer by following the Github instructions.

🛠 Installing

Once you have a local copy of the entire project on your computer, then:

  • Run bundle install in the terminal to install the gem dependencies in the Gemfile.
  • Verify that all the gems in the Gemfile have been installed
    . Run gem info telegram-bot-ruby in the terminal to check that this gem is installed
    . Run gem info net-http-persistent in the terminal to check that this gem is installed

🛠 Testing

If you like to test the ruby methods used, then:

  • run rspec -v in the terminal to check if the previous bundle install terminal command installed rspec in the Gemfile.
  • if not, add gem 'rspec' on a new line in the Gemfile and run bundle install in the terminal again to install rspec.
  • run rspec in the terminal to test the methods used in this project.

💥 Use bot

Finally, you can use the verse&newsbot:

  • run ruby ./bin/script.rb in the terminal to execute the ruby script.
  • Open your browser and load this URL https://web.telegram.org/#/im?p=@knowbiblebot.
  • If not, signin to your telegram account and you should be able to chat with the bot.

Alternatively: After running the ruby ./bin/script.rb command in the terminal, you can signin to your telegram account and type @knowbiblebot in the search area instead of loading the above URL.

✒️ Authors

👤 Mworekwa Ezekiel

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

👍 Show your support

Give a ⭐️ if you like this project!

👏 Acknowledgements

Ruby Telegram bot documentation here:

About

A Telegram bot built using Ruby to provide random bible verses and the latest US news headlines. The project makes use of the Telegram bot API to connect with the Telegram messenger UI and the RapidAPI to gather random bible verses and the latest US news headlines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages