Skip to content

enionsouza/Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Robot with Ruby!

Microverse Capstone Project - Ruby Module

screenshot

What can this bot do?

I will keep you up with inspiring quotes and funny jokes!

Inspirational quotes are one way to help you to stay positive, productive, and happy as you move along your journey. Even saying one motivational quote to yourself in front of the mirror each day can make an enormous impact on your day-to-day life. Additionally, keep in mind that old saying: "Laughter is the Best Medicine". Laughter strengthens your immune system, boosts mood, diminishes pain, and protects you from the damaging effects of stress. So, let's keep our attitude up!

Built With

  • Ruby (version 3.0.1)
  • The following required Gems:
    • gem 'nokogiri' (version 1.11.3)
    • gem 'rspec' (version 3.10.0)
    • gem 'rubocop' (version 1.14.0)
    • gem 'telegram-bot-ruby' (version 0.15.0)

Live Demo

To avoid the disclosure of the API Token used in this project, no live demo was provided. Please follow the steps listed below to run this app on your machine.

Getting Started

To get a local copy up and running, follow these simple example steps:

Prerequisites

  • You should have Ruby (version 3.0.1 or higher) installed on your computer.
  • Additionally, you should have an account on Telegram and you'll have to create a new robot on the platform, as shown below:

Create your Telegram Robot

To run this project, you'll need to create your rob

  • On Telegram, search for @BotFather, this is an app provided by Telegram for creating bots screenshot
  • Once you've started BotFather, enter /newbot
  • Then, enter your bot name and a username. Notice that the bot's username should end with bot
  • Now, you should receive an API Token from BotFather. Save this information for later use.
  • Finally, search for your newly created robot on Telegram and start it!

Install

  • On your bash, go to the directory of your preference and run git clone git@github.com:enionsouza/Telegram-Bot.git
  • Next run cd Telegram-Bot/config
  • Open the file named robot_token-example.txt with the editor of your preference.
  • Now, replace the generic example of API Token with the token you've received from BotFather, in the previous step. Save this edited file in this same directory with the name robot_token.txt
  • Next, on your bash, run cd ..
  • Finally, to run the required gems used in this project run bundle install

Run tests

  • To run the tests, go to your Telegram-Bot directory, and run rspec

Usage and Deployment

  • Now that you're in Telegram-Bot directory, run cd bin
  • To turn your Telegram Robot on, either run ./main.rb or ruby main.rb
  • Now go to your Telegram Robot and enter /help. The other available commands should appear on your screen, as the robot's response
  • To stop your Telegram Robot, hit command + Z or CTRL + Z on your keyboard

About the quotes and jokes sources

Author

👤 Ênio Neves de Souza

🤝 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!

Acknowledgments

  • My beloved family, for all the support provided!
  • @fernandorpm, for the valuable tips! Thanks, my mentor!
  • Microverse Team

📝 License

This project is MIT licensed.

About

Microverse Capstone Project - Ruby Module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages