This Ruby-based project (OOP). The purpose of this project is to program daily inspirational quotes via Telegram. It also sends jokes whenever the user writes their own name.
- Ruby 2.7.0
- Rubocop
- Rspec
- telegram-bot-ruby library
To get a local copy up and running follow these simple example steps.
- Open the terminal comand line window
git clone https://github.com/jessicafarias/Personal_bot.git
- Open the spec folder and run the personal bot
- Enjoy!
Add following line to your Gemfile:
gem 'telegram-bot-ruby'
And then execute:
$ bundle
Or install it system-wide:
$ gem install telegram-bot-ruby
To inicialize the telegram bot just write the following command on the root folder.
bin/main.rb
- Open Telegram the program provides you the link of the bot
- In the telegram chat clic on "start" and automaticly you will write "/start" and the bot will ask you for your name
- Write your name to display a joke
- Write "/daily 20:30" to programm a daily inspirational quote 8:30pm every day
- Verify the terminal displaying messages of the modification made by the user.
To run the Rspec and check for testing cases write the following command on the root folder.
rspec
Telegram::Bot::Api
#call
returns hash
has status
has result
when token is invalid
testing an invalid token raises an error
#method_missing
responds to endpoints
when method name is in snake case
responds to snake-cased endpoints
Telegram::Bot::Client
#new
with any options
accepts any option
with logger option
removes logger from options
Telegram::Bot::Exceptions::ResponseError
verifying error in response
Telegram::Bot
testing if telegram bot works
Jokes
#jockes
request joke is a string
initialize testing
#dailyquotes
request quote is a string
initialize testing
👤 Jessica Farias
- Github: jessicafarias
- Twitter: @FariasRosado
- Linkedin: jessica-michelle-farias-rosado
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.